Skip to content

Commit

Permalink
Initial steps towards migrating to phpunit 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Sep 28, 2010
1 parent f63b093 commit ba168d1
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion cake/tests/cases/libs/model/model.test.php
Expand Up @@ -20,7 +20,7 @@
App::import('Core', array('AppModel', 'Model'));
require_once dirname(__FILE__) . DS . 'models.php';

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

/**
* ModelBaseTest
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/cases/libs/model/models.php
Expand Up @@ -23,7 +23,7 @@
define('CAKEPHP_UNIT_TEST_EXECUTION', 1);
}

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

/**
* Test class
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/fixtures/assert_tags_test_case.php
@@ -1,6 +1,6 @@
<?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
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/fixtures/fixturized_test_case.php
@@ -1,6 +1,6 @@
<?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
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/cake_fixture_manager.php
Expand Up @@ -17,7 +17,7 @@
* @since CakePHP(tm) v 2.0
* @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 {

Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/cake_test_case.php
Expand Up @@ -18,7 +18,7 @@
* @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_test_model.php';
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/cake_test_fixture.php
Expand Up @@ -18,7 +18,7 @@
* @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.
Expand Down
6 changes: 3 additions & 3 deletions cake/tests/lib/cake_test_suite_dispatcher.php
Expand Up @@ -145,7 +145,7 @@ protected function _checkPHPUnit() {
public function loadTestFramework() {
$found = $path = null;

if (@include 'PHPUnit' . DS . 'Framework.php') {
if (@include 'PHPUnit' . DS . 'Autoload.php') {
$found = true;
}

Expand All @@ -157,11 +157,11 @@ public function loadTestFramework() {
}

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) {
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT');
PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
}
return $found;
}
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/coverage/base_coverage_report.php
Expand Up @@ -19,7 +19,7 @@
* @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 {

Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/coverage/html_coverage_report.php
Expand Up @@ -19,7 +19,7 @@
*/
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 {

Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/coverage/text_coverage_report.php
Expand Up @@ -19,7 +19,7 @@
*/
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 {

Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/reporter/cake_base_reporter.php
Expand Up @@ -18,7 +18,7 @@
* @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
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/reporter/cake_html_reporter.php
Expand Up @@ -19,7 +19,7 @@
*/
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
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/reporter/cake_text_reporter.php
Expand Up @@ -20,7 +20,7 @@

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
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/test_manager.php
Expand Up @@ -22,7 +22,7 @@
define('APP_TEST_CASES', TESTS . 'cases');
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';

/**
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/lib/test_runner.php
Expand Up @@ -22,7 +22,7 @@
require 'PHPUnit/TextUI/Command.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
Expand Down

0 comments on commit ba168d1

Please sign in to comment.