Starting to fix issues with PHPUnit 3.6 compatibility.

This commit is contained in:
mark_story 2011-11-02 23:25:09 -04:00
parent b983aa9192
commit 13900dc75c
19 changed files with 7 additions and 52 deletions

View file

@ -342,7 +342,7 @@ class ConfigureTest extends CakeTestCase {
/**
* test reader() throwing exceptions on missing interface.
*
* @expectedException Exception
* @expectedException PHPUnit_Framework_Error
* @return void
*/
public function testReaderExceptionOnIncorrectClass() {

View file

@ -21,8 +21,6 @@ App::uses('Model', 'Model');
App::uses('AppModel', 'Model');
require_once dirname(__FILE__) . DS . 'models.php';
PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
/**
* ModelBaseTest
*

View file

@ -19,8 +19,6 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
/**
* Test class
*

View file

@ -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 @@ class AssertTagsTestCase extends CakeTestCase {
);
$this->assertTags($input, $pattern);
}
}
}

View file

@ -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 @@ class FixturizedTestCase extends CakeTestCase {
public function testThrowException() {
throw new Exception();
}
}
}

View file

@ -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');

View file

@ -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 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner {
}
return new CakeFixtureManager();
}
}
}

View file

@ -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 {

View file

@ -26,8 +26,6 @@ App::uses('CakeTestCase', 'TestSuite');
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 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
} else {
$suite = $runner->getTest(
$this->arguments['test'],
$this->arguments['testFile'],
$this->arguments['syntaxCheck']
$this->arguments['testFile']
);
}
@ -175,4 +172,4 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
}
return $this->arguments['printer'] = $object;
}
}
}

View file

@ -151,9 +151,6 @@ class CakeTestSuiteDispatcher {
$found = include 'PHPUnit' . DS . 'Autoload.php';
}
}
if ($found) {
PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
}
return $found;
}

View file

@ -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');

View file

@ -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 {
/**

View file

@ -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 {

View file

@ -18,8 +18,6 @@
*/
App::uses('BaseCoverageReport', 'TestSuite/Coverage');
PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
class TextCoverageReport extends BaseCoverageReport {
/**

View file

@ -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');

View file

@ -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');
/**

View file

@ -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 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
$this->paintPass($test, $time);
}
}
}

View file

@ -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.

View file

@ -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
*