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

testGet() public method

public testGet ( )
    public function testGet()
    {
        $document = new \Smalot\PdfParser\Document();
        $content = '<</Type/Page/SubType/Text/Font 5 0 R/Resources 8 0 R>>foo';
        $position = 0;
        $header = \Smalot\PdfParser\Header::parse($content, $document, $position);
        $object = new \Smalot\PdfParser\Page($document, $header);
        $document->setObjects(array('5_0' => $object));
        $this->assert->object($header->get('Type'))->isInstanceOf('\\Smalot\\PdfParser\\Element\\ElementName');
        $this->assert->object($header->get('SubType'))->isInstanceOf('\\Smalot\\PdfParser\\Element\\ElementName');
        $this->assert->object($header->get('Font'))->isInstanceOf('\\Smalot\\PdfParser\\Page');
        $this->assert->object($header->get('Image'))->isInstanceOf('\\Smalot\\PdfParser\\Element\\ElementMissing');
        $resources = $header->get('Resources');
        $this->assert->variable($resources)->isNull();
    }