function _omit($object, $keys) { return Underscore::omit($object, $keys); }
/** * @tags objects */ public function testOmit() { // it should be able to omit certain keys from a list and preserve the general type $this->array(_::omit(['a' => 1, 'b' => 2, 'c' => 3], ['b', 'c']))->isEqualTo(['a' => 1]); // 2nd form $this->array(_::omit(['a' => 1, 'b' => 2, 'c' => 3], 'b', 'c'))->isEqualTo(['a' => 1]); // it shoud ignore keys that are not part of the list/object $object = new \stdClass(); $object->a = 1; $this->object(_::omit($object, 'b', 'c'))->isEqualTo((object) ['a' => 1]); }