Browse Source

Added missing calls to setUp & tearDown in tests

Marc Würth 12 years ago
parent
commit
1cac1846a3

+ 2 - 0
lib/Cake/Test/Case/Cache/Engine/RedisEngineTest.php

@@ -34,6 +34,7 @@ class RedisEngineTest extends CakeTestCase {
  * @return void
  */
 	public function setUp() {
+		parent::setUp();
 		$this->skipIf(!class_exists('Redis'), 'Redis is not installed or configured properly.');
 
 		$this->_cacheDisable = Configure::read('Cache.disable');
@@ -51,6 +52,7 @@ class RedisEngineTest extends CakeTestCase {
  * @return void
  */
 	public function tearDown() {
+		parent::tearDown();
 		Configure::write('Cache.disable', $this->_cacheDisable);
 		Cache::drop('');
 		Cache::drop('redis_groups');

+ 2 - 0
lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php

@@ -72,6 +72,7 @@ class CookieComponentTest extends CakeTestCase {
  * @return void
  */
 	public function setUp() {
+		parent::setUp();
 		$_COOKIE = array();
 		$this->Controller = new CookieComponentTestController(new CakeRequest(), new CakeResponse());
 		$this->Controller->constructClasses();
@@ -93,6 +94,7 @@ class CookieComponentTest extends CakeTestCase {
  * @return void
  */
 	public function tearDown() {
+		parent::tearDown();
 		$this->Cookie->destroy();
 	}
 

+ 1 - 0
lib/Cake/Test/Case/Model/Behavior/AclBehaviorTest.php

@@ -226,6 +226,7 @@ class AclBehaviorTest extends CakeTestCase {
  * @return void
  */
 	public function testSetup() {
+		parent::setUp();
 		$User = new AclUser();
 		$this->assertTrue(isset($User->Behaviors->Acl->settings['User']));
 		$this->assertEquals('requester', $User->Behaviors->Acl->settings['User']['type']);

+ 2 - 0
lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php

@@ -62,6 +62,7 @@ class MysqlTest extends CakeTestCase {
  *
  */
 	public function setUp() {
+		parent::setUp();
 		$this->Dbo = ConnectionManager::getDataSource('test');
 		if (!($this->Dbo instanceof Mysql)) {
 			$this->markTestSkipped('The MySQL extension is not available.');
@@ -76,6 +77,7 @@ class MysqlTest extends CakeTestCase {
  *
  */
 	public function tearDown() {
+		parent::tearDown();
 		unset($this->model);
 		ClassRegistry::flush();
 		Configure::write('debug', $this->_debug);

+ 2 - 0
lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php

@@ -215,6 +215,7 @@ class PostgresTest extends CakeTestCase {
  *
  */
 	public function setUp() {
+		parent::setUp();
 		Configure::write('Cache.disable', true);
 		$this->Dbo = ConnectionManager::getDataSource('test');
 		$this->skipIf(!($this->Dbo instanceof Postgres));
@@ -227,6 +228,7 @@ class PostgresTest extends CakeTestCase {
  *
  */
 	public function tearDown() {
+		parent::tearDown();
 		Configure::write('Cache.disable', false);
 		unset($this->Dbo2);
 	}

+ 2 - 0
lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php

@@ -266,6 +266,7 @@ class SqlserverTest extends CakeTestCase {
  *
  */
 	public function setUp() {
+		parent::setUp();
 		$this->Dbo = ConnectionManager::getDataSource('test');
 		if (!($this->Dbo instanceof Sqlserver)) {
 			$this->markTestSkipped('Please configure the test datasource to use SQL Server.');
@@ -280,6 +281,7 @@ class SqlserverTest extends CakeTestCase {
  * @return void
  */
 	public function tearDown() {
+		parent::tearDown();
 		unset($this->Dbo);
 		unset($this->model);
 	}

+ 1 - 0
lib/Cake/Test/Case/Network/Email/DebugTransportTest.php

@@ -34,6 +34,7 @@ class DebugTransportTest extends CakeTestCase {
  * @return void
  */
 	public function setUp() {
+		parent::setUp();
 		$this->DebugTransport = new DebugTransport();
 	}
 

+ 1 - 0
lib/Cake/Test/Case/Network/Email/MailTransportTest.php

@@ -34,6 +34,7 @@ class MailTransportTest extends CakeTestCase {
  * @return void
  */
 	public function setUp() {
+		parent::setUp();
 		$this->MailTransport = $this->getMock('MailTransport', array('_mail'));
 		$this->MailTransport->config(array('additionalParameters' => '-f'));
 	}

+ 1 - 0
lib/Cake/Test/Case/Network/Email/SmtpTransportTest.php

@@ -82,6 +82,7 @@ class SmtpTransportTest extends CakeTestCase {
  * @return void
  */
 	public function setUp() {
+		parent::setUp();
 		if (!class_exists('MockSocket')) {
 			$this->getMock('CakeSocket', array('read', 'write', 'connect', 'enableCrypto'), array(), 'MockSocket');
 		}

+ 2 - 0
lib/Cake/Test/Case/Network/Http/DigestAuthenticationTest.php

@@ -73,6 +73,7 @@ class DigestAuthenticationTest extends CakeTestCase {
  * @return void
  */
 	public function setUp() {
+		parent::setUp();
 		$this->HttpSocket = new DigestHttpSocket();
 		$this->HttpSocket->request['method'] = 'GET';
 		$this->HttpSocket->request['uri']['path'] = '/';
@@ -84,6 +85,7 @@ class DigestAuthenticationTest extends CakeTestCase {
  * @return void
  */
 	public function tearDown() {
+		parent::tearDown();
 		unset($this->HttpSocket);
 	}
 

+ 1 - 0
lib/Cake/Test/Case/Network/Http/HttpResponseTest.php

@@ -93,6 +93,7 @@ class HttpResponseTest extends CakeTestCase {
  * @return void
  */
 	public function setUp() {
+		parent::setUp();
 		$this->HttpResponse = new TestHttpResponse();
 	}
 

+ 2 - 0
lib/Cake/Test/Case/Network/Http/HttpSocketTest.php

@@ -193,6 +193,7 @@ class HttpSocketTest extends CakeTestCase {
  * @return void
  */
 	public function setUp() {
+		parent::setUp();
 		if (!class_exists('MockHttpSocket')) {
 			$this->getMock('TestHttpSocket', array('read', 'write', 'connect'), array(), 'MockHttpSocket');
 			$this->getMock('TestHttpSocket', array('read', 'write', 'connect', 'request'), array(), 'MockHttpSocketRequests');
@@ -208,6 +209,7 @@ class HttpSocketTest extends CakeTestCase {
  * @return void
  */
 	public function tearDown() {
+		parent::tearDown();
 		unset($this->Socket, $this->RequestSocket);
 	}
 

+ 2 - 0
lib/Cake/Test/Case/Routing/DispatcherTest.php

@@ -511,6 +511,7 @@ class DispatcherTest extends CakeTestCase {
  * @return void
  */
 	public function setUp() {
+		parent::setUp();
 		$this->_get = $_GET;
 		$_GET = array();
 		$this->_post = $_POST;
@@ -538,6 +539,7 @@ class DispatcherTest extends CakeTestCase {
  * @return void
  */
 	public function tearDown() {
+		parent::tearDown();
 		$_GET = $this->_get;
 		$_POST = $this->_post;
 		$_FILES = $this->_files;

+ 1 - 0
lib/Cake/Test/Case/Routing/Filter/AssetDispatcherTest.php

@@ -30,6 +30,7 @@ class AssetDispatcherTest extends CakeTestCase {
  * @return void
  */
 	public function tearDown() {
+		parent::tearDown();
 		Configure::write('Dispatcher.filters', array());
 	}
 

+ 2 - 0
lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php

@@ -189,6 +189,7 @@ class CakeTestFixtureTest extends CakeTestCase {
  * @return void
  */
 	public function setUp() {
+		parent::setUp();
 		$methods = array_diff(get_class_methods('DboSource'), array('enabled'));
 		$methods[] = 'connect';
 
@@ -204,6 +205,7 @@ class CakeTestFixtureTest extends CakeTestCase {
  * @return void
  */
 	public function tearDown() {
+		parent::tearDown();
 		unset($this->criticDb);
 		$this->db->config = $this->_backupConfig;
 	}

+ 1 - 0
lib/Cake/Test/Case/Utility/CakeTimeTest.php

@@ -52,6 +52,7 @@ class CakeTimeTest extends CakeTestCase {
  * @return void
  */
 	public function tearDown() {
+		parent::tearDown();
 		unset($this->Time);
 		$this->_restoreSystemTimezone();
 	}

+ 1 - 0
lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php

@@ -79,6 +79,7 @@ class PaginatorHelperTest extends CakeTestCase {
  * @return void
  */
 	public function tearDown() {
+		parent::tearDown();
 		unset($this->View, $this->Paginator);
 	}