We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aaaafa9 commit 619fac0Copy full SHA for 619fac0
cookbook/testing/doctrine.rst
@@ -32,11 +32,14 @@ which makes all of this quite easy::
32
*/
33
private $em;
34
35
+ /**
36
+ * {@inheritDoc}
37
+ */
38
public function setUp()
39
{
40
static::$kernel = static::createKernel();
41
static::$kernel->boot();
- $this->em = static::$kernel->getContainer()->get('doctrine.orm.entity_manager');
42
+ $this->em = static::$kernel->getContainer()->get('doctrine')->getEntityManager();
43
}
44
45
public function testSearchByCategoryName()
@@ -48,4 +51,13 @@ which makes all of this quite easy::
48
51
49
52
$this->assertCount(1, $products);
50
53
54
+
55
56
57
58
+ protected function tearDown()
59
+ {
60
+ parent::tearDown();
61
+ $this->em->close();
62
+ }
63
0 commit comments