mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 02:26:17 +00:00
Replacing deprecated startTest/endTest by setUp/tearDown in bake templates.
This commit is contained in:
parent
1c3e1df305
commit
1debcb9ce6
1 changed files with 8 additions and 4 deletions
|
@ -64,22 +64,26 @@ class <?php echo $fullClassName; ?>TestCase extends CakeTestCase {
|
|||
|
||||
<?php endif; ?>
|
||||
/**
|
||||
* startTest method
|
||||
* setUp method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function startTest() {
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
$this-><?php echo $className . ' = ' . $construction; ?>
|
||||
}
|
||||
|
||||
/**
|
||||
* endTest method
|
||||
* tearDown method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function endTest() {
|
||||
public function tearDown() {
|
||||
unset($this-><?php echo $className;?>);
|
||||
ClassRegistry::flush();
|
||||
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
<?php foreach ($methods as $method): ?>
|
||||
|
|
Loading…
Add table
Reference in a new issue