cakephp2-php8/cake/tests/fixtures/fixturized_test_case.php
José Lorenzo Rodríguez fb09adca68 Adding tests for skipIf
2010-05-08 16:36:11 -04:30

54 lines
No EOL
1.1 KiB
PHP

<?php
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'DEFAULT');
/**
* This class helps in testing the life-cycle of fixtures inside a CakeTestCase
*
* @package cake
* @subpackage cake.tests.fixtures
*/
class FixturizedTestCase extends CakeTestCase {
/**
* Fixtures to use in this thes
* @var array
*/
public $fixtures = array('core.category');
/**
* test that the shared fixture is correctly set
*
* @return void
*/
public function testFixturePresent() {
$this->assertType('CakeFixtureManager', $this->sharedFixture);
}
/**
* test that it is possible to load fixtures on demand
*
* @return void
*/
public function testFixtureLoadOnDemand() {
$this->loadFixtures('Category');
}
/**
* test that a test is marked as skipped using skipIf and its first parameter evaluates to true
*
* @return void
*/
public function testSkipIfTrue() {
$this->skipIf(true);
}
/**
* test that a test is not marked as skipped using skipIf and its first parameter evaluates to false
*
* @return void
*/
public function testSkipIfFalse() {
$this->skipIf(false);
}
}