Smalot\PdfParser\Tests\Units\Header::testHas PHP Method

testHas() public method

public testHas ( )
    public function testHas()
    {
        $document = new \Smalot\PdfParser\Document();
        $content = '<</Type/Page/SubType/Text/Font 5 0 R>>foo';
        $position = 0;
        $header = \Smalot\PdfParser\Header::parse($content, $document, $position);
        $this->assert->boolean($header->has('Type'))->isEqualTo(true);
        $this->assert->boolean($header->has('SubType'))->isEqualTo(true);
        $this->assert->boolean($header->has('Font'))->isEqualTo(true);
        $this->assert->boolean($header->has('Text'))->isEqualTo(false);
    }