Example #1
0
 public function testReturnsErrorWhenModelThrowsException()
 {
     $username = '******';
     $password = '******';
     $this->model->expects($this->once())->method('login')->will($this->throwException(new Exception('exception message')));
     $this->facade->login($username, $password);
     $this->assertEquals(null, $this->facade->getResult());
     $this->assertEquals(array('message' => 'exception message'), $this->facade->getError());
 }