/** * @expectedException InvalidArgumentException * @expectedExceptionMessage User #404 not found */ public function testNotFound() { $this->dbal->expects($this->once())->method('find')->with(404)->will($this->returnValue(array())); $user = $this->mapper->findById(404); }