Example #1
0
 function its_exists_method_should_return_true_for_existing_types()
 {
     foreach (AttributeTypes::all() as $key => $value) {
         $this->exists($key)->shouldReturn(true);
     }
 }
Example #2
0
 /**
  * {@inheritDoc}
  */
 public function setType($type)
 {
     if (!AttributeTypes::exists($type)) {
         throw new \InvalidArgumentException();
     }
     $this->type = $type;
     return $this;
 }