@@ 100-109 (lines=10) @@ | ||
97 | $this->assertSame(null, $country->{'name:unknown-locale'}); |
|
98 | } |
|
99 | ||
100 | public function test_it_saves_translations() |
|
101 | { |
|
102 | $country = Country::whereCode('gr')->first(); |
|
103 | ||
104 | $country->name = '1234'; |
|
105 | $country->save(); |
|
106 | ||
107 | $country = Country::whereCode('gr')->first(); |
|
108 | $this->assertEquals('1234', $country->name); |
|
109 | } |
|
110 | ||
111 | public function test_it_saves_translations_with_mutator() |
|
112 | { |
|
@@ 181-190 (lines=10) @@ | ||
178 | $this->assertEquals('Belgium', $country->name); |
|
179 | } |
|
180 | ||
181 | public function test_it_creates_translations_using_the_shortcut() |
|
182 | { |
|
183 | $country = new Country(); |
|
184 | $country->code = 'be'; |
|
185 | $country->name = 'Belgium'; |
|
186 | $country->save(); |
|
187 | ||
188 | $country = Country::whereCode('be')->first(); |
|
189 | $this->assertEquals('Belgium', $country->name); |
|
190 | } |
|
191 | ||
192 | public function test_it_creates_translations_using_mass_assignment() |
|
193 | { |