cakephp2-php8/cake/console/templates/default/classes/test.ctp
Mark Story 08e7bcb7ab Merge branch '1.3' into integration
Conflicts:
	app/config/core.php
	cake/console/libs/acl.php
	cake/console/templates/skel/config/core.php
	cake/console/templates/skel/webroot/test.php
	cake/dispatcher.php
	cake/libs/view/errors/missing_action.ctp
	cake/libs/view/helpers/form.php
	cake/tests/cases/libs/cache/memcache.test.php
	cake/tests/cases/libs/controller/controller.test.php
	cake/tests/cases/libs/log/file_log.test.php
	cake/tests/cases/libs/model/cake_schema.test.php
	cake/tests/cases/libs/router.test.php
	cake/tests/cases/libs/view/helpers/ajax.test.php
	cake/tests/groups/bake.group.php
	cake/tests/groups/behaviors.group.php
	cake/tests/groups/i18n.group.php
	cake/tests/groups/javascript.group.php
	cake/tests/lib/reporter/cake_cli_reporter.php
2010-10-31 21:56:59 -04:00

56 lines
1.6 KiB
PHP

<?php
/**
* Test Case bake template
*
*
* PHP 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake
* @subpackage cake.console.libs.templates.objects
* @since CakePHP(tm) v 1.3
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
echo "<?php\n";
echo "/* ". $className ." Test cases generated on: " . date('Y-m-d H:m:s') . " : ". time() . "*/\n";
?>
App::import('<?php echo $type; ?>', '<?php echo $plugin . $className;?>');
<?php if ($mock and strtolower($type) == 'controller'): ?>
class Test<?php echo $fullClassName; ?> extends <?php echo $fullClassName; ?> {
public $autoRender = false;
public function redirect($url, $status = null, $exit = true) {
$this->redirectUrl = $url;
}
}
<?php endif; ?>
class <?php echo $fullClassName; ?>TestCase extends CakeTestCase {
<?php if (!empty($fixtures)): ?>
public $fixtures = array('<?php echo join("', '", $fixtures); ?>');
<?php endif; ?>
public function startTest() {
$this-><?php echo $className . ' =& ' . $construction; ?>
}
public function endTest() {
unset($this-><?php echo $className;?>);
ClassRegistry::flush();
}
<?php foreach ($methods as $method): ?>
public function test<?php echo Inflector::classify($method); ?>() {
}
<?php endforeach;?>
}