mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Fixing capitalization in ControllerTask & test cases.
This commit is contained in:
parent
943524b3a5
commit
37b575496c
2 changed files with 7 additions and 7 deletions
|
@ -128,13 +128,13 @@
|
||||||
$this->Session->setFlash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> deleted', true));
|
$this->Session->setFlash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> deleted', true));
|
||||||
$this->redirect(array('action'=>'index'));
|
$this->redirect(array('action'=>'index'));
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
$this->flash(__('<?php echo strtolower($singularHumanName); ?> deleted', true), array('action' => 'index'));
|
$this->flash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> deleted', true), array('action' => 'index'));
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
}
|
}
|
||||||
<?php if ($wannaUseSession): ?>
|
<?php if ($wannaUseSession): ?>
|
||||||
$this->Session->setFlash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> was not deleted', true));
|
$this->Session->setFlash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> was not deleted', true));
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
$this->flash(__('<?php echo strtolower($singularHumanName); ?> was not deleted', true), array('action' => 'index'));
|
$this->flash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> was not deleted', true), array('action' => 'index'));
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
$this->redirect(array('action' => 'index'));
|
$this->redirect(array('action' => 'index'));
|
||||||
}
|
}
|
|
@ -303,16 +303,16 @@ class ControllerTaskTest extends CakeTestCase {
|
||||||
$this->assertTrue(strpos($result, "\$this->set('articles', \$this->paginate());") !== false);
|
$this->assertTrue(strpos($result, "\$this->set('articles', \$this->paginate());") !== false);
|
||||||
|
|
||||||
$this->assertTrue(strpos($result, 'function view($id = null)') !== false);
|
$this->assertTrue(strpos($result, 'function view($id = null)') !== false);
|
||||||
$this->assertTrue(strpos($result, "\$this->Session->setFlash(__('Invalid Article', true))") !== false);
|
$this->assertTrue(strpos($result, "\$this->Session->setFlash(__('Invalid article', true))") !== false);
|
||||||
$this->assertTrue(strpos($result, "\$this->set('article', \$this->Article->read(null, \$id)") !== false);
|
$this->assertTrue(strpos($result, "\$this->set('article', \$this->Article->read(null, \$id)") !== false);
|
||||||
|
|
||||||
$this->assertTrue(strpos($result, 'function add()') !== false);
|
$this->assertTrue(strpos($result, 'function add()') !== false);
|
||||||
$this->assertTrue(strpos($result, 'if (!empty($this->data))') !== false);
|
$this->assertTrue(strpos($result, 'if (!empty($this->data))') !== false);
|
||||||
$this->assertTrue(strpos($result, 'if ($this->Article->save($this->data))') !== false);
|
$this->assertTrue(strpos($result, 'if ($this->Article->save($this->data))') !== false);
|
||||||
$this->assertTrue(strpos($result, "\$this->Session->setFlash(__('The Article has been saved', true))") !== false);
|
$this->assertTrue(strpos($result, "\$this->Session->setFlash(__('The article has been saved', true))") !== false);
|
||||||
|
|
||||||
$this->assertTrue(strpos($result, 'function edit($id = null)') !== false);
|
$this->assertTrue(strpos($result, 'function edit($id = null)') !== false);
|
||||||
$this->assertTrue(strpos($result, "\$this->Session->setFlash(__('The Article could not be saved. Please, try again.', true));") !== false);
|
$this->assertTrue(strpos($result, "\$this->Session->setFlash(__('The article could not be saved. Please, try again.', true));") !== false);
|
||||||
|
|
||||||
$this->assertTrue(strpos($result, 'function delete($id = null)') !== false);
|
$this->assertTrue(strpos($result, 'function delete($id = null)') !== false);
|
||||||
$this->assertTrue(strpos($result, 'if ($this->Article->delete($id))') !== false);
|
$this->assertTrue(strpos($result, 'if ($this->Article->delete($id))') !== false);
|
||||||
|
@ -346,13 +346,13 @@ class ControllerTaskTest extends CakeTestCase {
|
||||||
$this->assertTrue(strpos($result, "\$this->set('articles', \$this->paginate());") !== false);
|
$this->assertTrue(strpos($result, "\$this->set('articles', \$this->paginate());") !== false);
|
||||||
|
|
||||||
$this->assertTrue(strpos($result, 'function view($id = null)') !== false);
|
$this->assertTrue(strpos($result, 'function view($id = null)') !== false);
|
||||||
$this->assertTrue(strpos($result, "\$this->flash(__('Invalid Article', true), array('action' => 'index'))") !== false);
|
$this->assertTrue(strpos($result, "\$this->flash(__('Invalid article', true), array('action' => 'index'))") !== false);
|
||||||
$this->assertTrue(strpos($result, "\$this->set('article', \$this->Article->read(null, \$id)") !== false);
|
$this->assertTrue(strpos($result, "\$this->set('article', \$this->Article->read(null, \$id)") !== false);
|
||||||
|
|
||||||
$this->assertTrue(strpos($result, 'function add()') !== false);
|
$this->assertTrue(strpos($result, 'function add()') !== false);
|
||||||
$this->assertTrue(strpos($result, 'if (!empty($this->data))') !== false);
|
$this->assertTrue(strpos($result, 'if (!empty($this->data))') !== false);
|
||||||
$this->assertTrue(strpos($result, 'if ($this->Article->save($this->data))') !== false);
|
$this->assertTrue(strpos($result, 'if ($this->Article->save($this->data))') !== false);
|
||||||
$this->assertTrue(strpos($result, "\$this->flash(__('The Article has been saved.', true), array('action' => 'index'))") !== false);
|
$this->assertTrue(strpos($result, "\$this->flash(__('The article has been saved.', true), array('action' => 'index'))") !== false);
|
||||||
|
|
||||||
$this->assertTrue(strpos($result, 'function edit($id = null)') !== false);
|
$this->assertTrue(strpos($result, 'function edit($id = null)') !== false);
|
||||||
$this->assertTrue(strpos($result, "\$this->Article->Tag->find('list')") !== false);
|
$this->assertTrue(strpos($result, "\$this->Article->Tag->find('list')") !== false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue