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