cakephp2-php8/lib/Cake/tests/Fixture/FixturizedTestCase.php

62 lines
1.2 KiB
PHP
Raw Normal View History

2010-05-08 20:26:21 +00:00
<?php
2010-05-08 21:06:11 +00:00
PHP_CodeCoverage_Filter::getInstance()->addFileToBlacklist(__FILE__, 'DEFAULT');
2010-05-08 21:06:11 +00:00
2010-05-08 20:26:21 +00:00
/**
* This class helps in testing the life-cycle of fixtures inside a CakeTestCase
*
* @package cake.tests.fixtures
2010-05-08 20:26:21 +00:00
*/
class FixturizedTestCase extends CakeTestCase {
2010-05-08 21:06:11 +00:00
/**
* Fixtures to use in this thes
* @var array
*/
2010-05-08 20:26:21 +00:00
public $fixtures = array('core.category');
2010-05-08 21:06:11 +00:00
/**
* test that the shared fixture is correctly set
*
* @return void
*/
2010-05-08 20:26:21 +00:00
public function testFixturePresent() {
$this->assertInstanceOf('CakeFixtureManager', $this->fixtureManager);
2010-05-08 20:26:21 +00:00
}
2010-05-08 21:06:11 +00:00
/**
* test that it is possible to load fixtures on demand
*
* @return void
*/
public function testFixtureLoadOnDemand() {
$this->loadFixtures('Category');
}
2010-05-08 21:06:11 +00:00
/**
* 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);
}
/**
* test that a fixtures are unoaded even if the test throws exceptions
*
* @return void
*/
public function testThrowException() {
throw new Exception();
}
2010-05-08 20:26:21 +00:00
}