diff --git a/src/OpenConext/EngineBlockFunctionalTestingBundle/Fixtures/ServiceRegistryFixture.php b/src/OpenConext/EngineBlockFunctionalTestingBundle/Fixtures/ServiceRegistryFixture.php index c754c16697..4ee06eb297 100644 --- a/src/OpenConext/EngineBlockFunctionalTestingBundle/Fixtures/ServiceRegistryFixture.php +++ b/src/OpenConext/EngineBlockFunctionalTestingBundle/Fixtures/ServiceRegistryFixture.php @@ -136,6 +136,13 @@ public function remove($entityId, $role) ->setParameter('entityId', $entityId) ->setParameter('type', $role) ->execute(); + $this->entityManager->getConnection()->createQueryBuilder() + ->delete('sso_provider_roles_eb6', 'roles') + ->where('roles.entity_id = :entityId') + ->andWhere('roles.type = :type') + ->setParameter('entityId', $entityId) + ->setParameter('type', $role) + ->execute(); return $this; } diff --git a/tests/functional/OpenConext/EngineBlockBundle/Controller/Api/AttributeReleasePolicyControllerApiTest.php b/tests/functional/OpenConext/EngineBlockBundle/Controller/Api/AttributeReleasePolicyControllerApiTest.php index ac2bb4c5df..7f15034b58 100644 --- a/tests/functional/OpenConext/EngineBlockBundle/Controller/Api/AttributeReleasePolicyControllerApiTest.php +++ b/tests/functional/OpenConext/EngineBlockBundle/Controller/Api/AttributeReleasePolicyControllerApiTest.php @@ -478,11 +478,20 @@ private function addServiceProviderFixture(ServiceProvider $serviceProvider) $em->flush(); } + /** + * This call {->delete('sso_provider_roles_eb5')} has been added to temporary push to both sso_provider_roles_eb5 + * and sso_provider_roles_eb6 + * + * TODO: Remove this code after sso_provider_roles_eb5 has been phased out + */ private function clearMetadataFixtures() { $queryBuilder = $this->getContainer()->get('doctrine')->getConnection()->createQueryBuilder(); $queryBuilder ->delete('sso_provider_roles_eb5') ->execute(); + $this->getContainer()->get('doctrine')->getConnection()->createQueryBuilder() + ->delete('sso_provider_roles_eb6') + ->execute(); } } diff --git a/tests/functional/OpenConext/EngineBlockBundle/Controller/Api/ConnectionsControllerTest.php b/tests/functional/OpenConext/EngineBlockBundle/Controller/Api/ConnectionsControllerTest.php index 3c94e203ad..cc7a0aea12 100644 --- a/tests/functional/OpenConext/EngineBlockBundle/Controller/Api/ConnectionsControllerTest.php +++ b/tests/functional/OpenConext/EngineBlockBundle/Controller/Api/ConnectionsControllerTest.php @@ -394,12 +394,21 @@ private function disableMetadataPushApiFeatureFor(Client $client) $client->getContainer()->set('engineblock.features', $featureToggles); } + /** + * This call {->delete('sso_provider_roles_eb5')} has been added to temporary push to both sso_provider_roles_eb5 + * and sso_provider_roles_eb6 + * + * TODO: Remove this code after sso_provider_roles_eb5 has been phased out + */ private function clearMetadataFixtures() { $queryBuilder = $this->getContainer()->get('doctrine')->getConnection()->createQueryBuilder(); $queryBuilder ->delete('sso_provider_roles_eb5') ->execute(); + $this->getContainer()->get('doctrine')->getConnection()->createQueryBuilder() + ->delete('sso_provider_roles_eb6') + ->execute(); } /** diff --git a/tests/functional/OpenConext/EngineBlockBundle/Controller/Api/ConsentControllerTest.php b/tests/functional/OpenConext/EngineBlockBundle/Controller/Api/ConsentControllerTest.php index 529a2ad62a..b5562fc06c 100644 --- a/tests/functional/OpenConext/EngineBlockBundle/Controller/Api/ConsentControllerTest.php +++ b/tests/functional/OpenConext/EngineBlockBundle/Controller/Api/ConsentControllerTest.php @@ -297,12 +297,21 @@ private function addServiceProviderFixture(ServiceProvider $serviceProvider) $em->flush(); } + /** + * This call {->delete('sso_provider_roles_eb5')} has been added to temporary push to both sso_provider_roles_eb5 + * and sso_provider_roles_eb6 + * + * TODO: Remove this code after sso_provider_roles_eb5 has been phased out + */ private function clearMetadataFixtures() { $queryBuilder = $this->getContainer()->get('doctrine')->getConnection()->createQueryBuilder(); $queryBuilder ->delete('sso_provider_roles_eb5') ->execute(); + $this->getContainer()->get('doctrine')->getConnection()->createQueryBuilder() + ->delete('sso_provider_roles_eb6') + ->execute(); } private function clearConsentFixtures()