Exemplo n.º 1
0
 /** @test */
 public function it_should_make_a_casted_value()
 {
     $property = Factory::addProperty(ContactProperties::class, 'single', Factory::TYPE_INTEGER);
     $value = $this->factory->addValue($property, 'aa');
     static::assertInstanceOf(Values\IntegerValue::class, $value);
     static::assertEquals(0, $value->value);
 }
Exemplo n.º 2
0
 /**
  * Add new value to property.
  *
  * @param mixed $value
  */
 public function add($value)
 {
     $this->factory->addValue($this->property, $value);
     $this->factory->updateValue($this->property->name);
 }