Skip to content

Commit 29ecc0b

Browse files
authored
Update testing.md (#1555)
Change getContainer as a function instead of variable
1 parent 9383470 commit 29ecc0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

distribution/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ publicationDate: This value should not be null.',
207207
$this->assertResponseStatusCodeSame(204);
208208
$this->assertNull(
209209
// Through the container, you can access all your services from the tests, including the ORM, the mailer, remote API clients...
210-
static::$container->get('doctrine')->getRepository(Book::class)->findOneBy(['isbn' => '9781344037075'])
210+
static::getContainer()->get('doctrine')->getRepository(Book::class)->findOneBy(['isbn' => '9781344037075'])
211211
);
212212
}
213213

0 commit comments

Comments
 (0)