@@ 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 | { |
|
@@ 158-167 (lines=10) @@ | ||
155 | $this->assertEquals('Belgium', $country->name); |
|
156 | } |
|
157 | ||
158 | public function test_it_creates_translations_using_the_shortcut() |
|
159 | { |
|
160 | $country = new Country(); |
|
161 | $country->code = 'be'; |
|
162 | $country->name = 'Belgium'; |
|
163 | $country->save(); |
|
164 | ||
165 | $country = Country::whereCode('be')->first(); |
|
166 | $this->assertEquals('Belgium', $country->name); |
|
167 | } |
|
168 | ||
169 | public function test_it_creates_translations_using_mass_assignment() |
|
170 | { |