Permalink
Browse files

Starting to fix issues with PHPUnit 3.6 compatibility.

  • Loading branch information...
1 parent b983aa9 commit 13900dc75cdbe0eae3908f5b0444fc894ef03380 @markstory markstory committed Nov 3, 2011
@@ -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() {
@@ -21,8 +21,6 @@
App::uses('AppModel', 'Model');
require_once dirname(__FILE__) . DS . 'models.php';
-PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
-
/**
* ModelBaseTest
*
@@ -19,8 +19,6 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
-PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
-
/**
* Test class
*
@@ -1,7 +1,4 @@
<?php
-
-PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
-
/**
* This class helpes in indirectly testing the functionaliteies of CakeTestCase::assertTags
*
@@ -118,4 +115,4 @@ public function testBadAssertTags2() {
);
$this->assertTags($input, $pattern);
}
-}
+}
@@ -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
*
@@ -59,4 +56,4 @@ public function testSkipIfFalse() {
public function testThrowException() {
throw new Exception();
}
-}
+}
@@ -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');
@@ -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.
*
@@ -92,4 +90,4 @@ protected function _getFixtureManager($arguments) {
}
return new CakeFixtureManager();
}
-}
+}
@@ -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 {
@@ -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
*
@@ -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']
);
}
@@ -175,4 +172,4 @@ public function handleReporter($reporter) {
}
return $this->arguments['printer'] = $object;
}
-}
+}
@@ -151,9 +151,6 @@ public function loadTestFramework() {
$found = include 'PHPUnit' . DS . 'Autoload.php';
}
}
- if ($found) {
- PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
- }
return $found;
}
@@ -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');
@@ -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 {
/**
@@ -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 {
@@ -18,8 +18,6 @@
*/
App::uses('BaseCoverageReport', 'TestSuite/Coverage');
-PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
-
class TextCoverageReport extends BaseCoverageReport {
/**
@@ -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');
@@ -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');
/**
@@ -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
*
@@ -214,4 +212,4 @@ public function endTest(PHPUnit_Framework_Test $test, $time) {
$this->paintPass($test, $time);
}
-}
+}
@@ -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.
@@ -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
*

0 comments on commit 13900dc

Please sign in to comment.