|
@@ 544-548 (lines=5) @@
|
| 541 |
|
|
| 542 |
|
$testArr = []; |
| 543 |
|
|
| 544 |
|
foreach ($country->translations as $translation) { |
| 545 |
|
foreach ($country->translatedAttributes as $attr) { |
| 546 |
|
$testArr[$translation->locale][$attr] = $translation->{$attr}; |
| 547 |
|
} |
| 548 |
|
} |
| 549 |
|
|
| 550 |
|
$this->assertEquals($testArr, $country->getTranslationsArray()); |
| 551 |
|
} |
|
@@ 566-570 (lines=5) @@
|
| 563 |
|
|
| 564 |
|
$modelTranslations = []; |
| 565 |
|
|
| 566 |
|
foreach ($country->translations as $translation) { |
| 567 |
|
foreach ($country->translatedAttributes as $attr) { |
| 568 |
|
$modelTranslations[$translation->locale][$attr] = $translation->{$attr}; |
| 569 |
|
} |
| 570 |
|
} |
| 571 |
|
|
| 572 |
|
$expectedTranslations = [ |
| 573 |
|
'en' => ['name' => 'Ukraine'], |
|
@@ 592-596 (lines=5) @@
|
| 589 |
|
|
| 590 |
|
$modelTranslations = []; |
| 591 |
|
|
| 592 |
|
foreach ($country->translations as $translation) { |
| 593 |
|
foreach ($country->translatedAttributes as $attr) { |
| 594 |
|
$modelTranslations[$translation->locale][$attr] = $translation->{$attr}; |
| 595 |
|
} |
| 596 |
|
} |
| 597 |
|
|
| 598 |
|
$expectedTranslations = [ |
| 599 |
|
'en' => ['name' => 'Ukraine'], |