Skip to content

Commit

Permalink
Fixing file included in all_models.
Browse files Browse the repository at this point in the history
Adding skip as tests fail when classes already exist.
Fixing skip condition to use newer api.
  • Loading branch information
markstory committed Sep 25, 2010
1 parent 78c838b commit 92ed1e7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cake/tests/cases/libs/all_model.test.php
Expand Up @@ -36,7 +36,7 @@ class AllModelTest extends PHPUnit_Framework_TestSuite {
public static function suite() {
$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_write.test.php');
$suite->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'model' . DS . 'model_validation.test.php');
Expand Down
3 changes: 3 additions & 0 deletions cake/tests/cases/libs/configure.test.php
Expand Up @@ -714,6 +714,9 @@ function testLoadingWithSearchArray () {
* @return void
*/
function testMultipleLoading() {
if (class_exists('I18n', false) || class_exists('CakeSocket', false)) {
$this->markTestSkipped('Cannot test loading of classes that exist.');
}
$toLoad = array('I18n', 'CakeSocket');

$classes = array_flip(get_declared_classes());
Expand Down
12 changes: 4 additions & 8 deletions cake/tests/cases/libs/model/model_integration.test.php
Expand Up @@ -249,15 +249,11 @@ function testDynamicBehaviorAttachment() {
function testCrossDatabaseJoins() {
$config = new DATABASE_CONFIG();

$skip = $this->skipIf(
!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.'
);

$skip = (!isset($config->test) || !isset($config->test2));
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');
Expand Down

0 comments on commit 92ed1e7

Please sign in to comment.