[ 'User' => [ 'sn' => [0 => 'test2'], 'mail' => [0 => 'test@test.fr'], 'givenname' => [0 => 'test1'], 'cn' => [0 => 'testa'], 'userpassword' => [0 => 'test'], ] ] ]; $this->session($user); $authType = ['authType' => 'cn']; $this->session($authType); } /** * testDisplay method * * @return void */ public function testDisplay() { $this->authUser(); $this->get('/pages/home'); $this->assertResponseOk(); $this->assertResponseContains('Accueil'); } /** * Test that missing template renders 404 page in production * * @return void */ public function testMissingTemplate() { $this->authUser(); Configure::write('debug', false); $this->get('/pages/not_existing'); $this->assertResponseContains('Cette action est impossible'); } /** * Test that missing template in debug mode renders missing_template error page * * @return void */ public function testMissingTemplateInDebug() { $this->authUser(); Configure::write('debug', true); $this->get('/pages/not_existing'); $this->assertResponseFailure(); $this->assertResponseContains('Missing Template'); $this->assertResponseContains('Stacktrace'); } }