Skip to content

Commit

Permalink
nitpick
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Dec 20, 2017
1 parent f467286 commit 9d85290
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/TranslatableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,23 @@ public function setNameAttribute($value)
$this->attributes['name'] = "I just mutated {$value}";
}
});
$translations = ['nl' => 'hallo', 'en' => 'hello', 'kh' => 'សួរស្តី'];

$translations = [
'nl' => 'hallo',
'en' => 'hello',
'kh' => 'សួរស្តី'
];

$testModel->setTranslations('name', $translations);

$testModel->save();

$expected = ['nl' => 'I just mutated hallo', 'en' => 'I just mutated hello', 'kh' => 'I just mutated សួរស្តី'];
$expected = [
'nl' => 'I just mutated hallo',
'en' => 'I just mutated hello',
'kh' => 'I just mutated សួរស្តី'
];

$this->assertEquals($expected, $testModel->getTranslations('name'));
}
}

0 comments on commit 9d85290

Please sign in to comment.