SqlParser\Tests\Components\OptionsArrayTest::testHas PHP Method

testHas() public method

public testHas ( )
    public function testHas()
    {
        $component = OptionsArray::parse(new Parser(), $this->getTokensList('A B = /*comment*/ (test) C'), array('A' => 1, 'B' => array(2, 'var'), 'C' => 3));
        $this->assertTrue($component->has('A'));
        $this->assertEquals('test', $component->has('B'));
        $this->assertTrue($component->has('C'));
        $this->assertFalse($component->has('D'));
    }