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

61 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2010-05-08 20:26:21 +00:00
<?php
/**
* This class helps in testing the life-cycle of fixtures inside a CakeTestCase
*
* @package Cake.Test.Fixture
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 21:06:11 +00:00
*/
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
* @throws Exception
*/
public function testThrowException() {
throw new Exception();
}
}