function it_can_be_registered() { $attribute = Attribute::register('Author', 'string'); \PHPUnit_Framework_Assert::assertEquals('Author', $attribute->description); \PHPUnit_Framework_Assert::assertEquals('string', $attribute->type); }
/** * Execute the command. * * @param AttributeRepository $attributes * @return Attribute */ public function handle(AttributeRepository $attributes) { $attribute = Attribute::register($this->description, $this->type); $attributes->save($attribute); return $attribute; }