Skip to content

Commit 072fa22

Browse files
committed
meta: fix tests
1 parent ea265dd commit 072fa22

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

tests/Test/WebTestCaseConfigTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
namespace Liip\Acme\Tests\Test;
1515

1616
use Doctrine\Common\Annotations\Annotation\IgnoreAnnotation;
17+
use Liip\FunctionalTestBundle\Annotations\DisableDatabaseCache;
1718
use Liip\FunctionalTestBundle\Annotations\QueryCount;
1819
use Liip\FunctionalTestBundle\Test\WebTestCase;
1920
use Liip\Acme\Tests\AppConfig\AppConfigKernel;

tests/Test/WebTestCaseTest.php

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
/**
2323
* @IgnoreAnnotation("depends")
2424
* @IgnoreAnnotation("expectedException")
25+
* @IgnoreAnnotation("DisableDatabaseCache")
2526
*/
2627
class WebTestCaseTest extends WebTestCase
2728
{
@@ -326,7 +327,7 @@ public function testLoadFixtures(): void
326327
$this->assertTrue($user1->getEnabled());
327328

328329
// Load data from database
329-
$em = $this->client->getContainer()
330+
$em = self::$client->getContainer()
330331
->get('doctrine.orm.entity_manager');
331332

332333
$users = $em->getRepository('LiipFunctionalTestBundle:User')
@@ -414,7 +415,7 @@ public function testLoadDependentFixtures(): void
414415
$fixtures
415416
);
416417

417-
$em = $this->client->getContainer()
418+
$em = self::$client->getContainer()
418419
->get('doctrine.orm.entity_manager');
419420

420421
$users = $em->getRepository('LiipFunctionalTestBundle:User')
@@ -441,7 +442,7 @@ public function testLoadDependentFixturesWithDependencyInjected(): void
441442
$fixtures
442443
);
443444

444-
$em = $this->client->getContainer()
445+
$em = self::$client->getContainer()
445446
->get('doctrine.orm.entity_manager');
446447

447448
$users = $em->getRepository('LiipFunctionalTestBundle:User')
@@ -474,7 +475,7 @@ public function testLoadFixturesFiles(): void
474475
$fixtures
475476
);
476477

477-
$em = $this->client->getContainer()
478+
$em = self::$client->getContainer()
478479
->get('doctrine.orm.entity_manager');
479480

480481
$users = $em->getRepository('LiipFunctionalTestBundle:User')
@@ -552,7 +553,7 @@ public function testLoadFixturesFilesWithPurgeModeTruncate(): void
552553
public function testLoadFixturesFilesPaths(): void
553554
{
554555
$fixtures = $this->loadFixtureFiles([
555-
$this->client->getContainer()->get('kernel')->locateResource(
556+
self::$client->getContainer()->get('kernel')->locateResource(
556557
'@AcmeBundle/DataFixtures/ORM/user.yml'
557558
),
558559
]);
@@ -574,7 +575,7 @@ public function testLoadFixturesFilesPaths(): void
574575
$this->assertInternalType('string', $user1->getUsername());
575576
$this->assertTrue($user1->getEnabled());
576577

577-
$em = $this->client->getContainer()
578+
$em = self::$client->getContainer()
578579
->get('doctrine.orm.entity_manager');
579580

580581
$users = $em->getRepository('LiipFunctionalTestBundle:User')
@@ -616,7 +617,7 @@ public function testLoadFixturesFilesPathsWithoutLocateResource(): void
616617
$fixtures
617618
);
618619

619-
$em = $this->client->getContainer()
620+
$em = self::$client->getContainer()
620621
->get('doctrine.orm.entity_manager');
621622

622623
$users = $em->getRepository('LiipFunctionalTestBundle:User')
@@ -652,14 +653,14 @@ public function testUserWithFixtures(): void
652653

653654
$path = '/user/1';
654655

655-
$this->client->enableProfiler();
656+
self::$client->enableProfiler();
656657

657658
/** @var \Symfony\Component\DomCrawler\Crawler $crawler */
658-
$crawler = $this->client->request('GET', $path);
659+
$crawler = self::$client->request('GET', $path);
659660

660-
$this->assertStatusCode(200, $this->client);
661+
$this->assertStatusCode(200, self::$client);
661662

662-
if ($profile = $this->client->getProfile()) {
663+
if ($profile = self::$client->getProfile()) {
663664
// One query
664665
$this->assertSame(1,
665666
$profile->getCollector('db')->getQueryCount());

0 commit comments

Comments
 (0)