public function Execute(IProcedure $Procedure) { if (!$this->Domain->HasEntityMap($Procedure->GetEntityType())) { throw $this->TypeMismatch('procedure', $Procedure->GetEntityType()); } $this->ProcedureToExecute[] = $Procedure; }
/** * @expectedException \Storm\Core\Object\ObjectException */ public function testUnmappedProcedureIsDisallowed() { $Procedure = $this->getMock(self::CoreObjectNamespace . 'IProcedure'); $Procedure->expects($this->any())->method('GetEntityType')->will($this->returnValue(__CLASS__)); $this->UnitOfWork->Execute($Procedure); }