client = $this->getClientAuthenticated(); $this->client->request('POST', "/api/1.0/main/address/{$addressId}/duplicate.json"); $this->assertResponseIsSuccessful('test that duplicate is successful'); } public static function generateAddressIds(): iterable { self::bootKernel(); $em = self::getContainer()->get(EntityManagerInterface::class); $qb = $em->createQueryBuilder(); $addresses = $qb->select('a')->from(Address::class, 'a') ->setMaxResults(2) ->getQuery() ->getResult(); foreach ($addresses as $a) { yield [$a->getId()]; } self::ensureKernelShutdown(); } }