Example #1
0
 /**
  * Populates the $records attribute with Type objects, created
  * from $data attribute.
  *
  * @return void
  */
 protected function createTypeRecords()
 {
     $typeFactory = new TypeFactory();
     foreach ($this->data as $data) {
         $this->records[] = $typeFactory->getType($data);
     }
 }
Example #2
0
 /**
  * @expectedException \MarcusJaschen\Collmex\Exception\InvalidTypeIdentifierException
  */
 public function testInvalidType()
 {
     $data = array('INVALID_TYPE', 'data', 'foo', 'bar');
     $this->typeFactory->getType($data);
 }