Example #1
0
 /**
  * @param $count
  * @return BaseModel|Collection
  * @internal param array $attributes
  */
 private function getModelMock($count = 1)
 {
     if (is_null($this->factoryInstance)) {
         throw new \LogicException('No factory class passed to model factory, cannot generate a mock');
     }
     $entity = $this->factoryInstance->times($count)->make($this->customizations);
     return $entity;
 }
Example #2
0
 /**
  * Create an new builder instance.
  *
  * @param  \Analogue\ORM\System\Manager
  * @param  string  $class
  * @param  string  $name
  * @param  array  $definitions
  * @param  \Faker\Generator  $faker
  * @return void
  */
 public function __construct(Manager $manager, $class, $name, array $definitions, Faker $faker)
 {
     $this->manager = $manager;
     $this->entityFactory = new EntityFactory();
     // Introduced in
     $states = [];
     parent::__construct($class, $name, $definitions, $states, $faker);
 }