function validate_whitelist() { return Object::values(Arrays::clean(Arrays::each(Object::keys($_POST), function ($key) { if (!Arrays::has($this->get_fields(), $key)) { return $this->build_error('illegal', array('%key%' => $key)); } }))); }
public function testCanGetKeys() { $object = Object::keys($this->object); $this->assertEquals(array('foo', 'bis'), $object); }