Fix for Consolce/Task/TestTask::getRealClassName(). Controller names of exactly 10 letters

being returned incorrectly

Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
Rob McVey 2012-02-28 14:58:28 +00:00 committed by mark_story
parent 757579e1d1
commit 8e93c4cd34
2 changed files with 7 additions and 1 deletions

View file

@ -274,7 +274,10 @@ class TestTask extends BakeTask {
if (strtolower($type) == 'model' || empty($this->classTypes[$type])) {
return $class;
}
if (strlen($class) - strpos($class, $type) == strlen($type)) {
$position = strpos($class, $type);
if ($position !== false && strlen($class) - $position == strlen($type)) {
return $class;
}
return $class . $type;