public function testGetQuery_DocumentnameMissing() { $query = new FindByDocumentNameQuery(); $query->setDocument(new Document()); try { $query->getQuery(); $this->fail('an exception should be thrown'); } catch (\RuntimeException $e) { $this->assertTrue(true); } }
/** * @expectedException \RuntimeException */ public function testGetQuery_DocumentnameMissing() { $query = new FindByDocumentNameQuery(); $query->setDocument(new Document()); $query->getQuery(); }