/** * @param string $className * @param Blueprint $blueprint * @param array $attributeOverrides * @return object */ public function make($className, Blueprint $blueprint, $attributeOverrides) { $instance = new $className(); $attributes = $attributeOverrides; $sequences = array(); if (!empty($attributes[':sequences'])) { $sequences = $attributes[':sequences']; unset($attributes[':sequences']); } $sequences = $sequences + $blueprint->getSequences(); $this->withSequences($instance, $sequences); $attributes = $attributes + $blueprint->getAttributes(); $this->withAttributes($instance, $attributes); return $instance; }
public function testSetSequencesAndGetSequences() { $sequences = array(1, 2, 3); $this->blueprint->setSequences($sequences); $this->assertEquals($sequences, $this->blueprint->getSequences()); }