Initial steps towards migrating to phpunit 3.5

This commit is contained in:
José Lorenzo Rodríguez 2010-09-27 22:37:23 -04:30
parent f63b093d24
commit ba168d1a72
16 changed files with 18 additions and 18 deletions

View file

@ -20,7 +20,7 @@
App::import('Core', array('AppModel', 'Model')); App::import('Core', array('AppModel', 'Model'));
require_once dirname(__FILE__) . DS . 'models.php'; require_once dirname(__FILE__) . DS . 'models.php';
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
/** /**
* ModelBaseTest * ModelBaseTest

View file

@ -23,7 +23,7 @@ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) {
define('CAKEPHP_UNIT_TEST_EXECUTION', 1); define('CAKEPHP_UNIT_TEST_EXECUTION', 1);
} }
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
/** /**
* Test class * Test class

View file

@ -1,6 +1,6 @@
<?php <?php
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
/** /**
* This class helpes in indirectly testing the functionaliteies of CakeTestCase::assertTags * This class helpes in indirectly testing the functionaliteies of CakeTestCase::assertTags

View file

@ -1,6 +1,6 @@
<?php <?php
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
/** /**
* This class helps in testing the life-cycle of fixtures inside a CakeTestCase * This class helps in testing the life-cycle of fixtures inside a CakeTestCase

View file

@ -17,7 +17,7 @@
* @since CakePHP(tm) v 2.0 * @since CakePHP(tm) v 2.0
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
class CakeFixtureManager { class CakeFixtureManager {

View file

@ -18,7 +18,7 @@
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/ */
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
require_once CAKE_TESTS_LIB . 'cake_fixture_manager.php'; require_once CAKE_TESTS_LIB . 'cake_fixture_manager.php';
require_once CAKE_TESTS_LIB . 'cake_test_model.php'; require_once CAKE_TESTS_LIB . 'cake_test_model.php';

View file

@ -18,7 +18,7 @@
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/ */
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
/** /**
* Short description for class. * Short description for class.

View file

@ -145,7 +145,7 @@ class CakeTestSuiteDispatcher {
public function loadTestFramework() { public function loadTestFramework() {
$found = $path = null; $found = $path = null;
if (@include 'PHPUnit' . DS . 'Framework.php') { if (@include 'PHPUnit' . DS . 'Autoload.php') {
$found = true; $found = true;
} }
@ -157,11 +157,11 @@ class CakeTestSuiteDispatcher {
} }
if ($path && ini_set('include_path', $path . PATH_SEPARATOR . ini_get('include_path'))) { if ($path && ini_set('include_path', $path . PATH_SEPARATOR . ini_get('include_path'))) {
$found = include 'PHPUnit' . DS . 'Framework.php'; $found = include 'PHPUnit' . DS . 'Autoload.php';
} }
} }
if ($found) { if ($found) {
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
} }
return $found; return $found;
} }

View file

@ -19,7 +19,7 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/ */
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
abstract class BaseCoverageReport { abstract class BaseCoverageReport {

View file

@ -19,7 +19,7 @@
*/ */
require_once dirname(__FILE__) . '/base_coverage_report.php'; require_once dirname(__FILE__) . '/base_coverage_report.php';
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
class HtmlCoverageReport extends BaseCoverageReport { class HtmlCoverageReport extends BaseCoverageReport {

View file

@ -19,7 +19,7 @@
*/ */
require_once dirname(__FILE__) . '/base_coverage_report.php'; require_once dirname(__FILE__) . '/base_coverage_report.php';
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
class TextCoverageReport extends BaseCoverageReport { class TextCoverageReport extends BaseCoverageReport {

View file

@ -18,7 +18,7 @@
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License * @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
*/ */
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
/** /**
* CakeBaseReporter contains common reporting features used in the CakePHP Test suite * CakeBaseReporter contains common reporting features used in the CakePHP Test suite

View file

@ -19,7 +19,7 @@
*/ */
include_once dirname(__FILE__) . DS . 'cake_base_reporter.php'; include_once dirname(__FILE__) . DS . 'cake_base_reporter.php';
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
/** /**
* CakeHtmlReporter Reports Results of TestSuites and Test Cases * CakeHtmlReporter Reports Results of TestSuites and Test Cases

View file

@ -20,7 +20,7 @@
include_once dirname(__FILE__) . DS . 'cake_base_reporter.php'; include_once dirname(__FILE__) . DS . 'cake_base_reporter.php';
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
/** /**
* CakeTextReporter contains reporting features used for plain text based output * CakeTextReporter contains reporting features used for plain text based output

View file

@ -22,7 +22,7 @@ define('CORE_TEST_GROUPS', TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'groups'
define('APP_TEST_CASES', TESTS . 'cases'); define('APP_TEST_CASES', TESTS . 'cases');
define('APP_TEST_GROUPS', TESTS . 'groups'); define('APP_TEST_GROUPS', TESTS . 'groups');
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
require_once CAKE_TESTS_LIB . 'cake_test_suite.php'; require_once CAKE_TESTS_LIB . 'cake_test_suite.php';
/** /**

View file

@ -22,7 +22,7 @@
require 'PHPUnit/TextUI/Command.php'; require 'PHPUnit/TextUI/Command.php';
require_once 'test_manager.php'; require_once 'test_manager.php';
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT'); PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
/** /**
* Class to customize loading of test suites from CLI * Class to customize loading of test suites from CLI