mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Initial steps towards migrating to phpunit 3.5
This commit is contained in:
parent
f63b093d24
commit
ba168d1a72
16 changed files with 18 additions and 18 deletions
|
@ -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
|
||||
|
|
|
@ -23,7 +23,7 @@ if (!defined('CAKEPHP_UNIT_TEST_EXECUTION')) {
|
|||
define('CAKEPHP_UNIT_TEST_EXECUTION', 1);
|
||||
}
|
||||
|
||||
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT');
|
||||
PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
|
||||
|
||||
/**
|
||||
* Test class
|
||||
|
|
|
@ -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
|
||||
|
|
2
cake/tests/fixtures/fixturized_test_case.php
vendored
2
cake/tests/fixtures/fixturized_test_case.php
vendored
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -145,7 +145,7 @@ class CakeTestSuiteDispatcher {
|
|||
public function loadTestFramework() {
|
||||
$found = $path = null;
|
||||
|
||||
if (@include 'PHPUnit' . DS . 'Framework.php') {
|
||||
if (@include 'PHPUnit' . DS . 'Autoload.php') {
|
||||
$found = true;
|
||||
}
|
||||
|
||||
|
@ -157,11 +157,11 @@ class CakeTestSuiteDispatcher {
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_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';
|
||||
|
||||
/**
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue