This repository was archived by the owner on Sep 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public function setUp()
21
21
'Symfony\Cmf\Bundle\MenuBundle\Tests\Resources\DataFixtures\PHPCR\LoadMenuData ' ,
22
22
));
23
23
$ this ->client = $ this ->createClient ();
24
- $ this ->documentManager = $ this ->db ( ' PHPCR ' )->getOm ( );
24
+ $ this ->documentManager = $ this ->client -> getContainer ( )->get ( ' doctrine_phpcr.odm.document_manager ' );
25
25
}
26
26
27
27
public function testMenuList ()
@@ -84,7 +84,8 @@ public function testMenuDelete()
84
84
// If we have a 302 redirect, then all is well
85
85
$ this ->assertEquals (302 , $ res ->getStatusCode ());
86
86
87
- $ this ->setExpectedException ('PHPCR\InvalidItemStateException ' );
88
- $ menuItem = $ this ->documentManager ->find (null , '/test/menus/test-menu ' );
87
+ $ documentManager = $ this ->client ->getContainer ()->get ('doctrine_phpcr.odm.document_manager ' );
88
+ $ menu = $ documentManager ->find (null , '/test/menus/test-menu ' );
89
+ $ this ->assertNull ($ menu );
89
90
}
90
91
}
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ public function setUp()
21
21
'Symfony\Cmf\Bundle\MenuBundle\Tests\Resources\DataFixtures\PHPCR\LoadMenuData ' ,
22
22
));
23
23
$ this ->client = $ this ->createClient ();
24
- $ this ->documentManager = $ this ->db ('PHPCR ' )->getOm ();
25
24
}
26
25
27
26
public function testEdit ()
@@ -45,7 +44,8 @@ public function testDelete()
45
44
// If we have a 302 redirect, then all is well
46
45
$ this ->assertEquals (302 , $ res ->getStatusCode ());
47
46
48
- $ this ->setExpectedException ('PHPCR\InvalidItemStateException ' );
49
- $ menuItem = $ this ->documentManager ->find (null , '/test/menus/test-menu/item-2 ' );
47
+ $ documentManager = $ this ->client ->getContainer ()->get ('doctrine_phpcr.odm.document_manager ' );
48
+ $ menuItem = $ documentManager ->find (null , '/test/menus/test-menu/item-2 ' );
49
+ $ this ->assertNull ($ menuItem );
50
50
}
51
51
}
You can’t perform that action at this time.
0 commit comments