duplicate projects with all settings (#1465)

This commit is contained in:
Kevin Papst
2020-02-13 16:47:20 +01:00
committed by GitHub
parent 057c824e9f
commit c67617262f
34 changed files with 383 additions and 180 deletions

View File

@@ -13,15 +13,15 @@ use App\Entity\Customer;
use App\Entity\Project;
use App\Entity\User;
use App\Tests\DataFixtures\TeamFixtures;
use Symfony\Bundle\FrameworkBundle\Client;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\HttpKernelBrowser;
/**
* @group integration
*/
class TeamControllerTest extends APIControllerBaseTest
{
protected function importTeamFixtures(Client $client): void
protected function importTeamFixtures(HttpKernelBrowser $client): void
{
$fixture = new TeamFixtures();
$fixture->setAmount(1);
@@ -334,7 +334,7 @@ class TeamControllerTest extends APIControllerBaseTest
$customer->setVisible(false);
$customer->setCountry('DE');
$customer->setTimezone('Europe/Berlin');
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager');
$em->persist($customer);
$em->flush();
@@ -472,7 +472,7 @@ class TeamControllerTest extends APIControllerBaseTest
$project->setName('foooo');
$project->setVisible(false);
$project->setCustomer($customer);
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager');
$em->persist($customer);
$em->persist($project);
$em->flush();