mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Adjust unit tests with id parameter for exists() method
This commit is contained in:
parent
3ea39d96b4
commit
d8d65027ac
2 changed files with 2 additions and 2 deletions
|
@ -78,7 +78,7 @@
|
||||||
*/
|
*/
|
||||||
public function delete($id = null) {
|
public function delete($id = null) {
|
||||||
$this->BakeArticle->id = $id;
|
$this->BakeArticle->id = $id;
|
||||||
if (!$this->BakeArticle->exists()) {
|
if (!$this->BakeArticle->exists($id)) {
|
||||||
throw new NotFoundException(__('Invalid bake article'));
|
throw new NotFoundException(__('Invalid bake article'));
|
||||||
}
|
}
|
||||||
$this->request->allowMethod('post', 'delete');
|
$this->request->allowMethod('post', 'delete');
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
*/
|
*/
|
||||||
public function delete($id = null) {
|
public function delete($id = null) {
|
||||||
$this->BakeArticle->id = $id;
|
$this->BakeArticle->id = $id;
|
||||||
if (!$this->BakeArticle->exists()) {
|
if (!$this->BakeArticle->exists($id)) {
|
||||||
throw new NotFoundException(__('Invalid bake article'));
|
throw new NotFoundException(__('Invalid bake article'));
|
||||||
}
|
}
|
||||||
$this->request->allowMethod('post', 'delete');
|
$this->request->allowMethod('post', 'delete');
|
||||||
|
|
Loading…
Reference in a new issue