/** * Build the attributes. * * @todo Figure out where the concatenation of the ID belongs to. * * @param array $attributes * @return array */ private function buildAttributes(array $attributes) { $builder = new AttributeBuilder($attributes); $attributes = $builder->build(); array_push($attributes, self::PRIMARY_KEY); return $attributes; }
/** @test **/ public function it_can_accept_an_expanded_config_file() { $config = [['name' => 'title', 'type' => 'string', 'required' => true, 'unique' => true], ['name' => 'status', 'type' => 'string', 'default' => 'draft']]; $builder = new AttributeBuilder($config); $this->assertEquals($config, $builder->build()); }