/** * * @expectedException \Exception * @expectedExceptionMessage Can't create Email record * @throws Exception */ public function testGetException() { $service = new Email(); $service->setDataSource(new PDOMock()); $rowCount = $service->create([]); $this->assertInternalType('int', $rowCount); }