Esempio n. 1
0
 public function testToArray()
 {
     $obj = new \stdClass();
     $obj->data = [];
     $attribute = ArrayAttribute::make($obj, $obj->data, 'test', []);
     $attribute['hello'] = 'world';
     $this->assertEquals(['hello' => 'world'], $attribute->toArray());
 }
Esempio n. 2
0
 public function errors($value = null)
 {
     return ArrayAttribute::make($this, $this->data, __FUNCTION__)->handle(func_get_args());
 }