Skip to content

Commit

Permalink
Starting to fix issues with PHPUnit 3.6 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Nov 5, 2011
1 parent b983aa9 commit 13900dc
Show file tree
Hide file tree
Showing 19 changed files with 7 additions and 52 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Core/ConfigureTest.php
Expand Up @@ -342,7 +342,7 @@ public function testReaderSetup() {
/**
* test reader() throwing exceptions on missing interface.
*
* @expectedException Exception
* @expectedException PHPUnit_Framework_Error
* @return void
*/
public function testReaderExceptionOnIncorrectClass() {
Expand Down
2 changes: 0 additions & 2 deletions lib/Cake/Test/Case/Model/ModelTestBase.php
Expand Up @@ -21,8 +21,6 @@
App::uses('AppModel', 'Model');
require_once dirname(__FILE__) . DS . 'models.php';

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

/**
* ModelBaseTest
*
Expand Down
2 changes: 0 additions & 2 deletions lib/Cake/Test/Case/Model/models.php
Expand Up @@ -19,8 +19,6 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

/**
* Test class
*
Expand Down
5 changes: 1 addition & 4 deletions lib/Cake/Test/Fixture/AssertTagsTestCase.php
@@ -1,7 +1,4 @@
<?php

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

/**
* This class helpes in indirectly testing the functionaliteies of CakeTestCase::assertTags
*
Expand Down Expand Up @@ -118,4 +115,4 @@ public function testBadAssertTags2() {
);
$this->assertTags($input, $pattern);
}
}
}
5 changes: 1 addition & 4 deletions lib/Cake/Test/Fixture/FixturizedTestCase.php
@@ -1,7 +1,4 @@
<?php

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

/**
* This class helps in testing the life-cycle of fixtures inside a CakeTestCase
*
Expand Down Expand Up @@ -59,4 +56,4 @@ public function testSkipIfFalse() {
public function testThrowException() {
throw new Exception();
}
}
}
3 changes: 0 additions & 3 deletions lib/Cake/TestSuite/CakeTestCase.php
Expand Up @@ -16,9 +16,6 @@
* @since CakePHP(tm) v 1.2.0.4667
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

App::uses('CakeFixtureManager', 'TestSuite/Fixture');
App::uses('CakeTestFixture', 'TestSuite/Fixture');

Expand Down
4 changes: 1 addition & 3 deletions lib/Cake/TestSuite/CakeTestRunner.php
Expand Up @@ -17,8 +17,6 @@
*/
require_once 'PHPUnit/TextUI/TestRunner.php';

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

/**
* A custom test runner for Cake's use of PHPUnit.
*
Expand Down Expand Up @@ -92,4 +90,4 @@ protected function _getFixtureManager($arguments) {
}
return new CakeFixtureManager();
}
}
}
2 changes: 0 additions & 2 deletions lib/Cake/TestSuite/CakeTestSuite.php
Expand Up @@ -16,8 +16,6 @@
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

App::uses('Folder', 'Utility');

class CakeTestSuite extends PHPUnit_Framework_TestSuite {
Expand Down
7 changes: 2 additions & 5 deletions lib/Cake/TestSuite/CakeTestSuiteCommand.php
Expand Up @@ -26,8 +26,6 @@
App::uses('ControllerTestCase', 'TestSuite');
App::uses('CakeTestModel', 'TestSuite/Fixture');

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

/**
* Class to customize loading of test suites from CLI
*
Expand Down Expand Up @@ -70,8 +68,7 @@ public function run(array $argv, $exit = true) {
} else {
$suite = $runner->getTest(
$this->arguments['test'],
$this->arguments['testFile'],
$this->arguments['syntaxCheck']
$this->arguments['testFile']
);
}

Expand Down Expand Up @@ -175,4 +172,4 @@ public function handleReporter($reporter) {
}
return $this->arguments['printer'] = $object;
}
}
}
3 changes: 0 additions & 3 deletions lib/Cake/TestSuite/CakeTestSuiteDispatcher.php
Expand Up @@ -151,9 +151,6 @@ public function loadTestFramework() {
$found = include 'PHPUnit' . DS . 'Autoload.php';
}
}
if ($found) {
PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
}
return $found;
}

Expand Down
2 changes: 0 additions & 2 deletions lib/Cake/TestSuite/ControllerTestCase.php
Expand Up @@ -17,8 +17,6 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

App::uses('Dispatcher', 'Routing');
App::uses('CakeTestCase', 'TestSuite');
App::uses('Router', 'Routing');
Expand Down
3 changes: 0 additions & 3 deletions lib/Cake/TestSuite/Coverage/BaseCoverageReport.php
Expand Up @@ -17,9 +17,6 @@
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

abstract class BaseCoverageReport {

/**
Expand Down
3 changes: 0 additions & 3 deletions lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php
Expand Up @@ -16,9 +16,6 @@
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

App::uses('BaseCoverageReport', 'TestSuite/Coverage');

class HtmlCoverageReport extends BaseCoverageReport {
Expand Down
2 changes: 0 additions & 2 deletions lib/Cake/TestSuite/Coverage/TextCoverageReport.php
Expand Up @@ -18,8 +18,6 @@
*/
App::uses('BaseCoverageReport', 'TestSuite/Coverage');

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

class TextCoverageReport extends BaseCoverageReport {

/**
Expand Down
2 changes: 0 additions & 2 deletions lib/Cake/TestSuite/Fixture/CakeFixtureManager.php
Expand Up @@ -16,8 +16,6 @@
* @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

App::uses('ConnectionManager', 'Model');
App::uses('ClassRegistry', 'Utility');

Expand Down
3 changes: 0 additions & 3 deletions lib/Cake/TestSuite/Fixture/CakeTestFixture.php
Expand Up @@ -16,9 +16,6 @@
* @since CakePHP(tm) v 1.2.0.4667
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

App::uses('CakeSchema', 'Model');

/**
Expand Down
4 changes: 1 addition & 3 deletions lib/Cake/TestSuite/Reporter/CakeBaseReporter.php
Expand Up @@ -17,8 +17,6 @@
*/
require_once 'PHPUnit/TextUI/ResultPrinter.php';

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

/**
* CakeBaseReporter contains common reporting features used in the CakePHP Test suite
*
Expand Down Expand Up @@ -214,4 +212,4 @@ public function endTest(PHPUnit_Framework_Test $test, $time) {
$this->paintPass($test, $time);
}

}
}
2 changes: 0 additions & 2 deletions lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
Expand Up @@ -17,8 +17,6 @@
*/
App::uses('CakeBaseReporter', 'TestSuite/Reporter');

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

/**
* CakeHtmlReporter Reports Results of TestSuites and Test Cases
* in an HTML format / context.
Expand Down
3 changes: 0 additions & 3 deletions lib/Cake/TestSuite/Reporter/CakeTextReporter.php
Expand Up @@ -15,12 +15,9 @@
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/

App::uses('CakeBaseReporter', 'TestSuite/Reporter');
App::uses('TextCoverageReport', 'TestSuite/Coverage');

PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');

/**
* CakeTextReporter contains reporting features used for plain text based output
*
Expand Down

0 comments on commit 13900dc

Please sign in to comment.