コード例 #1
0
 /**
  * @test
  */
 public function it_returns_the_correct_builder_types()
 {
     $storage = new FileFixtureStorage();
     foreach ($this->builders as $resourceName => $classPath) {
         $path = BuilderFactory::getBuilder($resourceName, $storage);
         $this->assertEquals(get_class($path), $classPath);
     }
 }
コード例 #2
0
 /**
  * @param $resourceName
  * @return Builders\Address|Builders\Admin|Builders\Customer|Builders\General|Builders\Order|Builders\Product
  */
 private function getBuilder($resourceName)
 {
     return $this->builders[$resourceName] = BuilderFactory::getBuilder($resourceName, $this->storage);
 }