diff --git a/api/tests/integration/EntityTest.php b/api/tests/integration/EntityTest.php index 9de6d651..9f710dea 100644 --- a/api/tests/integration/EntityTest.php +++ b/api/tests/integration/EntityTest.php @@ -759,7 +759,8 @@ public function testPutOneLocalization() // Create an entity $entity = factory(App\Models\TestEntity::class)->create(); - $region = array_pop(array_pluck(config('regions.supported'), 'code')); + $supportedRegions = array_pluck(config('regions.supported'), 'code'); + $region = array_pop($supportedRegions); $localization = [ 'varchar' => 'foobar', @@ -823,7 +824,8 @@ public function testGetOneLocalization() // Create an entity $entity = factory(App\Models\TestEntity::class)->create(); - $region = array_pop(array_pluck(config('regions.supported'), 'code')); + $supportedRegions = array_pluck(config('regions.supported'), 'code'); + $region = array_pop($supportedRegions); $localization = [ 'varchar' => 'barfoo', @@ -899,7 +901,8 @@ public function testShouldGetLocalizedContent() // Create an entity $entity = factory(App\Models\TestEntity::class)->create(); - $region = array_pop(array_pluck(config('regions.supported'), 'code')); + $supportedRegions = array_pluck(config('regions.supported'), 'code'); + $region = array_pop($supportedRegions); $localization = [ 'varchar' => 'foofoo',