Skip to content

Commit

Permalink
Remove deprecated method use.
Browse files Browse the repository at this point in the history
Stop calling deprecated features of Log.
  • Loading branch information
markstory committed Aug 13, 2013
1 parent a8a6513 commit edce895
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
5 changes: 3 additions & 2 deletions lib/Cake/Test/TestCase/Core/ObjectTest.php
Expand Up @@ -198,8 +198,8 @@ public function setUp() {
$this->object = new TestObject();
Configure::write('App.namespace', 'TestApp');
Configure::write('Security.salt', 'not-the-default');
Log::disable('stdout');
Log::disable('stderr');
Log::drop('stdout');
Log::drop('stderr');
}

/**
Expand All @@ -210,6 +210,7 @@ public function setUp() {
public function tearDown() {
parent::tearDown();
Plugin::unload();
Log::reset();
unset($this->object);
}

Expand Down
25 changes: 5 additions & 20 deletions lib/Cake/Test/TestCase/Database/Log/QueryLoggerTest.php
Expand Up @@ -23,29 +23,17 @@
/**
* Tests QueryLogger class
*
**/
class QueryLoggerTest extends \Cake\TestSuite\TestCase {

/**
* Contains a list of disabled logging engines that will be re-enabled
* on tearDown
*
* @var array
*/
protected $_disabledEngines = [];
class QueryLoggerTest extends \Cake\TestSuite\TestCase {

/**
* Set up
*
* @return void
*/
public function setUp() {
foreach (Log::configured() as $e) {
if (Log::enabled($e)) {
Log::disable($e);
$this->_disabledEngines[] = $e;
}
}
parent::setUp();
Log::reset();
}

/**
Expand All @@ -54,11 +42,8 @@ public function setUp() {
* @return void
*/
public function tearDown() {
Log::drop('queryLoggerTest');
Log::drop('queryLoggerTest2');
foreach ($this->_disabledEngines as $e) {
Log::enable($e);
}
parent::tearDown();
Log::reset();
}

/**
Expand Down

0 comments on commit edce895

Please sign in to comment.