public function DiscardWhere(ICriterion $Criterion) { if (!$this->Domain->HasEntityMap($Criterion->GetEntityType())) { throw $this->TypeMismatch('criterion', $Criterion->GetEntityType()); } $this->DiscardedCriteria[spl_object_hash($Criterion)] = $Criterion; }
/** * @expectedException \Storm\Core\Object\ObjectException */ public function testUnmappedCriterionIsDisallowed() { $Criterion = $this->getMock(self::CoreObjectNamespace . 'ICriterion'); $Criterion->expects($this->any())->method('GetEntityType')->will($this->returnValue(__CLASS__)); $this->UnitOfWork->DiscardWhere($Criterion); }