|
@@ 90-99 (lines=10) @@
|
| 87 |
|
$this->assertSame(null, $country->{'name:unknown-locale'}); |
| 88 |
|
} |
| 89 |
|
|
| 90 |
|
public function test_it_saves_translations() |
| 91 |
|
{ |
| 92 |
|
$country = Country::whereCode('gr')->first(); |
| 93 |
|
|
| 94 |
|
$country->name = '1234'; |
| 95 |
|
$country->save(); |
| 96 |
|
|
| 97 |
|
$country = Country::whereCode('gr')->first(); |
| 98 |
|
$this->assertEquals('1234', $country->name); |
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
public function test_it_saves_translations_with_mutator() |
| 102 |
|
{ |
|
@@ 148-157 (lines=10) @@
|
| 145 |
|
$this->assertEquals('Belgium', $country->name); |
| 146 |
|
} |
| 147 |
|
|
| 148 |
|
public function test_it_creates_translations_using_the_shortcut() |
| 149 |
|
{ |
| 150 |
|
$country = new Country(); |
| 151 |
|
$country->code = 'be'; |
| 152 |
|
$country->name = 'Belgium'; |
| 153 |
|
$country->save(); |
| 154 |
|
|
| 155 |
|
$country = Country::whereCode('be')->first(); |
| 156 |
|
$this->assertEquals('Belgium', $country->name); |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
public function test_it_creates_translations_using_mass_assignment() |
| 160 |
|
{ |