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:
mark_story 2010-09-19 14:18:27 -04:00
parent 78c838bcdd
commit 92ed1e76da
3 changed files with 8 additions and 9 deletions

View file

@ -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');

View file

@ -714,6 +714,9 @@ class AppImportTest extends CakeTestCase {
* @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());

View file

@ -249,15 +249,11 @@ class ModelIntegrationTest extends BaseModelTest {
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');