pictcode / lib / Cake / Console / Templates / default / classes / test.ctp @ 05c0cc17
履歴 | 表示 | アノテート | ダウンロード (2.01 KB)
| 1 |
<?php |
|---|---|
| 2 |
/** |
| 3 |
* Test Case bake template |
| 4 |
* |
| 5 |
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org) |
| 6 |
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) |
| 7 |
* |
| 8 |
* Licensed under The MIT License |
| 9 |
* For full copyright and license information, please see the LICENSE.txt |
| 10 |
* Redistributions of files must retain the above copyright notice. |
| 11 |
* |
| 12 |
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) |
| 13 |
* @link http://cakephp.org CakePHP(tm) Project |
| 14 |
* @package Cake.Console.Templates.default.classes |
| 15 |
* @since CakePHP(tm) v 1.3 |
| 16 |
* @license http://www.opensource.org/licenses/mit-license.php MIT License |
| 17 |
*/ |
| 18 |
|
| 19 |
echo "<?php\n"; |
| 20 |
?> |
| 21 |
<?php foreach ($uses as $dependency): ?> |
| 22 |
App::uses('<?php echo $dependency[0]; ?>', '<?php echo $dependency[1]; ?>');
|
| 23 |
<?php endforeach; ?> |
| 24 |
|
| 25 |
/** |
| 26 |
* <?php echo $fullClassName; ?> Test Case |
| 27 |
*/ |
| 28 |
<?php if ($type === 'Controller'): ?> |
| 29 |
class <?php echo $fullClassName; ?>Test extends ControllerTestCase {
|
| 30 |
<?php else: ?> |
| 31 |
class <?php echo $fullClassName; ?>Test extends CakeTestCase {
|
| 32 |
<?php endif; ?> |
| 33 |
|
| 34 |
<?php if (!empty($fixtures)): ?> |
| 35 |
/** |
| 36 |
* Fixtures |
| 37 |
* |
| 38 |
* @var array |
| 39 |
*/ |
| 40 |
public $fixtures = array( |
| 41 |
'<?php echo join("',\n\t\t'", $fixtures); ?>'
|
| 42 |
); |
| 43 |
|
| 44 |
<?php endif; ?> |
| 45 |
<?php if (!empty($construction)): ?> |
| 46 |
/** |
| 47 |
* setUp method |
| 48 |
* |
| 49 |
* @return void |
| 50 |
*/ |
| 51 |
public function setUp() {
|
| 52 |
parent::setUp(); |
| 53 |
<?php echo $preConstruct ? "\t\t" . $preConstruct : ''; ?> |
| 54 |
$this-><?php echo $className . ' = ' . $construction; ?> |
| 55 |
<?php echo $postConstruct ? "\t\t" . $postConstruct : ''; ?> |
| 56 |
} |
| 57 |
|
| 58 |
/** |
| 59 |
* tearDown method |
| 60 |
* |
| 61 |
* @return void |
| 62 |
*/ |
| 63 |
public function tearDown() {
|
| 64 |
unset($this-><?php echo $className; ?>); |
| 65 |
|
| 66 |
parent::tearDown(); |
| 67 |
} |
| 68 |
|
| 69 |
<?php endif; ?> |
| 70 |
<?php foreach ($methods as $method): ?> |
| 71 |
/** |
| 72 |
* test<?php echo Inflector::camelize($method); ?> method |
| 73 |
* |
| 74 |
* @return void |
| 75 |
*/ |
| 76 |
public function test<?php echo Inflector::camelize($method); ?>() {
|
| 77 |
$this->markTestIncomplete('test<?php echo Inflector::camelize($method); ?> not implemented.');
|
| 78 |
} |
| 79 |
|
| 80 |
<?php endforeach; ?> |
| 81 |
} |