/** * 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); } }
/** * @expectedException \MarcusJaschen\Collmex\Exception\InvalidTypeIdentifierException */ public function testInvalidType() { $data = array('INVALID_TYPE', 'data', 'foo', 'bar'); $this->typeFactory->getType($data); }