diff --git a/app/tests/App/Functional/Model/Product/ProductVisibilityFacadeTest.php b/app/tests/App/Functional/Model/Product/ProductVisibilityFacadeTest.php index cb8c84ff10..fd715ed67d 100644 --- a/app/tests/App/Functional/Model/Product/ProductVisibilityFacadeTest.php +++ b/app/tests/App/Functional/Model/Product/ProductVisibilityFacadeTest.php @@ -61,6 +61,6 @@ public function testAreProductsVisibleForDefaultPricingGroupOnEachDomainIndexedB $visibilityIndexedByProductId = $this->productVisibilityFacade->areProductsVisibleForDefaultPricingGroupOnSomeDomainIndexedByProductId( [$productId], ); - $this->assertTrue($visibilityIndexedByProductId[$productId]); + $this->assertSame($visibilityIndexedByProductId[$productId], $this->domain->isMultidomain()); } } diff --git a/app/tests/FrontendApiBundle/Functional/Customer/User/CurrentCustomerUserTest.php b/app/tests/FrontendApiBundle/Functional/Customer/User/CurrentCustomerUserTest.php index 7b17e0f3b1..92ee473b3f 100644 --- a/app/tests/FrontendApiBundle/Functional/Customer/User/CurrentCustomerUserTest.php +++ b/app/tests/FrontendApiBundle/Functional/Customer/User/CurrentCustomerUserTest.php @@ -227,19 +227,19 @@ public function testChangePersonalDataWithWrongData(): void $firstDomainLocale = $this->getLocaleForFirstDomain(); $expectedViolationMessages = [ - 0 => t( + 'input.firstName' => t( 'First name cannot be longer than {{ limit }} characters', ['{{ limit }}' => 100], 'validators', $firstDomainLocale, ), - 1 => t( + 'input.lastName' => t( 'Last name cannot be longer than {{ limit }} characters', ['{{ limit }}' => 100], 'validators', $firstDomainLocale, ), - 2 => t( + 'input.telephone' => t( 'Telephone number cannot be longer than {{ limit }} characters', ['{{ limit }}' => 30], 'validators', @@ -250,13 +250,12 @@ public function testChangePersonalDataWithWrongData(): void $this->assertResponseContainsArrayOfExtensionValidationErrors($response); $responseData = $this->getErrorsExtensionValidationFromResponse($response); - $i = 0; + $this->assertCount(count($expectedViolationMessages), $responseData); - foreach ($responseData as $responseRow) { + foreach ($responseData as $key => $responseRow) { foreach ($responseRow as $validationError) { $this->assertArrayHasKey('message', $validationError); - $this->assertEquals($expectedViolationMessages[$i], $validationError['message']); - $i++; + $this->assertEquals($expectedViolationMessages[$key], $validationError['message']); } } }