コード例 #1
0
 public function testWrongFactorySource()
 {
     $this->setExpectedException(UnableToBuild::class);
     $plan = new FactoryObjectProductBuildPlan();
     $plan->setFactoryObject(new ScalarValue("not a factory"));
     $this->haringo->buildObjectBasedOn($plan);
 }
コード例 #2
0
 public function mapToObject(array $previouslyMappedObject)
 {
     $plan = new FactoryObjectProductBuildPlan();
     $plan->setFactoryObject($this->objectSourceMapper->mapToObject($previouslyMappedObject[0]));
     $plan->setBuildMethodCall($this->methodCallMapper->mapToObject($previouslyMappedObject[1]));
     return $plan;
 }