public function testCreateShouldThrowExceptionWhenFieldIsNotPresent() { $strategy = new ServiceLocatorStrategy($this->serviceManager); $myDomainObject = $this->serviceManager->get('MyDomainObject'); $data = ['foo' => 'bar']; $this->setExpectedException('\\Matryoshka\\Model\\Exception\\RuntimeException'); $strategy->createObject($myDomainObject, $data); }