|
@@ 99-108 (lines=10) @@
|
| 96 |
|
$this->assertSame(null, $country->{'name:unknown-locale'}); |
| 97 |
|
} |
| 98 |
|
|
| 99 |
|
public function test_it_saves_translations() |
| 100 |
|
{ |
| 101 |
|
$country = Country::whereCode('gr')->first(); |
| 102 |
|
|
| 103 |
|
$country->name = '1234'; |
| 104 |
|
$country->save(); |
| 105 |
|
|
| 106 |
|
$country = Country::whereCode('gr')->first(); |
| 107 |
|
$this->assertEquals('1234', $country->name); |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
public function test_it_saves_translations_with_mutator() |
| 111 |
|
{ |
|
@@ 157-166 (lines=10) @@
|
| 154 |
|
$this->assertEquals('Belgium', $country->name); |
| 155 |
|
} |
| 156 |
|
|
| 157 |
|
public function test_it_creates_translations_using_the_shortcut() |
| 158 |
|
{ |
| 159 |
|
$country = new Country(); |
| 160 |
|
$country->code = 'be'; |
| 161 |
|
$country->name = 'Belgium'; |
| 162 |
|
$country->save(); |
| 163 |
|
|
| 164 |
|
$country = Country::whereCode('be')->first(); |
| 165 |
|
$this->assertEquals('Belgium', $country->name); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
public function test_it_creates_translations_using_mass_assignment() |
| 169 |
|
{ |