Nico Anastasio
Nico Anastasio

Reputation: 164

Template file "Error/error500.ctp" is missing. during Unit testing in CakePHP

I have set up PHPUnit into my CakePHP application,

but when I try to run it I receive this error:

Cake\View\Exception\MissingTemplateException: Template file "Error/error500.ctp" is missing.

I have tried several times with different settings of the phpunit.xml.dist page and nothing changes.

Here is the code:

public function testLogin()
{
    $this->get("/admin/users/login");
    $this->assertResponseOk();
}

Very simple method I am try to test within the tests/TestCase/Controller/Admin/UsersControllerTest.php

Upvotes: 0

Views: 1188

Answers (1)

jags
jags

Reputation: 35

make sure error500.ctp is present in template/Errro/ directory

Upvotes: 1

Related Questions