public function testHas() { // extra $input = array('a' => 1, 'b' => 2, 'c' => 3); $this->assertTrue(__::has($input, 'a')); $this->assertFalse(__::has($input, 'A')); $this->assertFalse(__::has($input, 'ab')); $this->assertTrue(__::has((object) $input, 'a')); $this->assertFalse(__::has((object) $input, 'A')); $this->assertFalse(__::has((object) $input, 'ab')); $this->assertTrue(__((object) $input)->has('a'), 'works in OO-style call'); // docs $this->assertTrue(__::has($input, 'b')); }
public function testHas() { // extra $input = array('a' => 1, 'b' => 2, 'c' => 3); $this->assertTrue(__::has($input, 'a')); $this->assertFalse(__::has($input, 'A')); $this->assertFalse(__::has($input, 'ab')); $this->assertTrue(__::has((object) $input, 'a')); $this->assertFalse(__::has((object) $input, 'A')); $this->assertFalse(__::has((object) $input, 'ab')); // docs $this->assertTrue(__::has($input, 'b')); }