mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 18:12:40 +00:00
Fixing file included in all_models.
Adding skip as tests fail when classes already exist. Fixing skip condition to use newer api.
This commit is contained in:
parent
78c838bcdd
commit
92ed1e76da
3 changed files with 8 additions and 9 deletions
|
@ -36,7 +36,7 @@ class AllModelTest extends PHPUnit_Framework_TestSuite {
|
||||||
public static function suite() {
|
public static function suite() {
|
||||||
$suite = new PHPUnit_Framework_TestSuite('All Model related class tests');
|
$suite = new PHPUnit_Framework_TestSuite('All Model related class tests');
|
||||||
|
|
||||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_behavior.test.php');
|
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'behavior_collection.test.php');
|
||||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_read.test.php');
|
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_read.test.php');
|
||||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_write.test.php');
|
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_write.test.php');
|
||||||
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_validation.test.php');
|
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_validation.test.php');
|
||||||
|
|
|
@ -714,6 +714,9 @@ class AppImportTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function testMultipleLoading() {
|
function testMultipleLoading() {
|
||||||
|
if (class_exists('I18n', false) || class_exists('CakeSocket', false)) {
|
||||||
|
$this->markTestSkipped('Cannot test loading of classes that exist.');
|
||||||
|
}
|
||||||
$toLoad = array('I18n', 'CakeSocket');
|
$toLoad = array('I18n', 'CakeSocket');
|
||||||
|
|
||||||
$classes = array_flip(get_declared_classes());
|
$classes = array_flip(get_declared_classes());
|
||||||
|
|
|
@ -249,15 +249,11 @@ class ModelIntegrationTest extends BaseModelTest {
|
||||||
function testCrossDatabaseJoins() {
|
function testCrossDatabaseJoins() {
|
||||||
$config = new DATABASE_CONFIG();
|
$config = new DATABASE_CONFIG();
|
||||||
|
|
||||||
$skip = $this->skipIf(
|
$skip = (!isset($config->test) || !isset($config->test2));
|
||||||
!isset($config->test) || !isset($config->test2),
|
|
||||||
'%s Primary and secondary test databases not configured, skipping cross-database '
|
|
||||||
.'join tests.'
|
|
||||||
.' To run these tests, you must define $test and $test2 in your database configuration.'
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($skip) {
|
if ($skip) {
|
||||||
return;
|
$this->markTestSkipped('Primary and secondary test databases not configured, skipping cross-database
|
||||||
|
join tests. To run theses tests defined $test and $test2 in your database configuration.'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->loadFixtures('Article', 'Tag', 'ArticlesTag', 'User', 'Comment');
|
$this->loadFixtures('Article', 'Tag', 'ArticlesTag', 'User', 'Comment');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue