cakephp2-php8/lib/Cake/Console/Templates/default/classes/test.ctp

82 lines
2 KiB
Text
Raw Normal View History

<?php
/**
* Test Case bake template
*
2017-06-10 21:33:55 +00:00
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
2017-06-10 21:33:55 +00:00
* @link https://cakephp.org CakePHP(tm) Project
* @package Cake.Console.Templates.default.classes
* @since CakePHP(tm) v 1.3
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
echo "<?php\n";
?>
<?php foreach ($uses as $dependency): ?>
App::uses('<?php echo $dependency[0]; ?>', '<?php echo $dependency[1]; ?>');
<?php endforeach; ?>
2011-01-20 00:22:50 +00:00
/**
* <?php echo $fullClassName; ?> Test Case
*/
<?php if ($type === 'Controller'): ?>
2012-05-11 18:28:01 +00:00
class <?php echo $fullClassName; ?>Test extends ControllerTestCase {
<?php else: ?>
2012-05-11 18:28:01 +00:00
class <?php echo $fullClassName; ?>Test extends CakeTestCase {
<?php endif; ?>
<?php if (!empty($fixtures)): ?>
2011-01-20 00:22:50 +00:00
/**
* Fixtures
*
* @var array
*/
public $fixtures = array(
'<?php echo join("',\n\t\t'", $fixtures); ?>'
);
<?php endif; ?>
<?php if (!empty($construction)): ?>
2011-01-20 00:22:50 +00:00
/**
* setUp method
2011-01-20 00:22:50 +00:00
*
* @return void
*/
public function setUp() {
parent::setUp();
2012-01-27 03:59:26 +00:00
<?php echo $preConstruct ? "\t\t" . $preConstruct : ''; ?>
$this-><?php echo $className . ' = ' . $construction; ?>
2012-01-27 03:59:26 +00:00
<?php echo $postConstruct ? "\t\t" . $postConstruct : ''; ?>
}
2011-01-20 00:22:50 +00:00
/**
* tearDown method
2011-01-20 00:22:50 +00:00
*
* @return void
*/
public function tearDown() {
2012-05-19 14:48:15 +00:00
unset($this-><?php echo $className; ?>);
parent::tearDown();
}
<?php endif; ?>
<?php foreach ($methods as $method): ?>
2011-01-20 00:22:50 +00:00
/**
* test<?php echo Inflector::camelize($method); ?> method
2011-01-20 00:22:50 +00:00
*
* @return void
*/
public function test<?php echo Inflector::camelize($method); ?>() {
$this->markTestIncomplete('test<?php echo Inflector::camelize($method); ?> not implemented.');
}
2012-05-19 14:48:15 +00:00
<?php endforeach; ?>
}