mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Added check for duplicate methods to prevent fatal php error
This commit is contained in:
parent
f11389fd10
commit
33dc57e667
1 changed files with 9 additions and 3 deletions
|
@ -84,15 +84,21 @@ class <?php echo $fullClassName; ?>TestCase extends CakeTestCase {
|
|||
parent::tearDown();
|
||||
}
|
||||
|
||||
<?php $methodKeys = array();?>
|
||||
<?php foreach ($methods as $method): ?>
|
||||
<?php
|
||||
$classifyMethodName = Inflector::classify($method);
|
||||
if(!in_array($classifyMethodName, $methodKeys)):
|
||||
$methodKeys[] = $classifyMethodName;
|
||||
?>
|
||||
/**
|
||||
* test<?php echo Inflector::classify($method); ?> method
|
||||
* test<?php echo $classifyMethodName; ?> method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function test<?php echo Inflector::classify($method); ?>() {
|
||||
public function test<?php echo $classifyMethodName; ?>() {
|
||||
|
||||
}
|
||||
|
||||
<?php endif; ?>
|
||||
<?php endforeach;?>
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue