function it_returns_the_validation_rules()
 {
     $this->getRules()->shouldReturn(['description' => 'required|string', 'type' => 'required|in:' . implode(',', Attribute::getAllowedTypes())]);
 }
 public function __construct()
 {
     $this->rules['type'] .= '|in:' . implode(',', Attribute::getAllowedTypes());
 }
Exemplo n.º 3
0
 function it_provides_a_list_of_possible_types()
 {
     $types = Attribute::getAllowedTypes();
     \PHPUnit_Framework_Assert::assertEquals(['string', 'numeric', 'in'], $types);
 }
Exemplo n.º 4
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     return view('attributes.create')->with('allowed_types', Attribute::getAllowedTypes());
 }