From ec9c8b4d49f1e675f66bdd4ae57c32ee26212fdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lorenzo=20Rodr=C3=ADguez?= Date: Sat, 8 May 2010 15:53:29 -0430 Subject: [PATCH] Adding the new class CakeTestSuite to setup some utility stuff like fixtures outside of CakeTestCase --- cake/tests/lib/cake_test_suite.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 cake/tests/lib/cake_test_suite.php diff --git a/cake/tests/lib/cake_test_suite.php b/cake/tests/lib/cake_test_suite.php new file mode 100644 index 000000000..c83612509 --- /dev/null +++ b/cake/tests/lib/cake_test_suite.php @@ -0,0 +1,29 @@ +_fixtureManager = $manager; + } + + protected function setUp() { + parent::setUp(); + if (!$this->_fixtureManager) { + return; + } + $classes = array(); + foreach ($this->getIterator() as $test) { + $this->_fixtureManager->fixturize($test); + } + $this->sharedFixture = $this->_fixtureManager; + } + + protected function tearDown() { + parent::tearDown(); + $this->_fixtureManager->shutDown(); + $this->_fixtureManager = null; + $this->sharedFixture = null; + } +} \ No newline at end of file