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