コード例 #1
0
 public function testExceptionHandlerPopulatesErrorMessage()
 {
     $this->login->shouldReceive('login')->andThrow('Aura\\Auth\\Exception\\MultipleMatches');
     $this->service->authenticate();
     $this->assertTrue($this->service->hasError());
     $this->assertEquals('There were multiple matches for your credentials in the database.', $this->service->getError(true));
     $this->assertEquals(['message', 'exception'], array_keys($this->service->getError()));
 }