File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
tests/AppBundle/Controller/Admin Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,9 @@ public function registerBundles()
36
36
$ bundles [] = new Sensio \Bundle \GeneratorBundle \SensioGeneratorBundle ();
37
37
38
38
if ($ this ->getEnvironment () === 'test ' ) {
39
- $ bundles [] = new \DAMA \DoctrineTestBundle \DAMADoctrineTestBundle ();
39
+ // this bundle is used to have isolated phpunit tests when interacting with doctrine & the database
40
+ // and is therefore only loaded for the 'test' environment
41
+ $ bundles [] = new DAMA \DoctrineTestBundle \DAMADoctrineTestBundle ();
40
42
}
41
43
}
42
44
Original file line number Diff line number Diff line change @@ -79,6 +79,13 @@ public function testAdminBackendHomePage()
79
79
);
80
80
}
81
81
82
+ /**
83
+ * This test will manipulate the database state by deleting a Post.
84
+ * All changes to the database are rolled back before the next test case is executed.
85
+ * This is done by using https://github.com/dmaicher/doctrine-test-bundle.
86
+ *
87
+ * Therefore in the following test case we can edit the Post with ID=1 although we deleted it in this test.
88
+ */
82
89
public function testAdminDeletePost ()
83
90
{
84
91
$ client = $ this ->getAdminClient ();
You can’t perform that action at this time.
0 commit comments