PHPExiftool\Test\AbstractReaderTest::testExtensions PHP Метод

testExtensions() публичный Метод

public testExtensions ( )
    public function testExtensions()
    {
        $reader = $this->getReader();
        $reader->in(self::$tmpDir);
        $this->assertEquals(3, count($reader->all()));
        $reader = $this->getReader();
        $reader->in(self::$tmpDir)->notRecursive()->extensions(array('cr2'));
        $this->assertEquals(0, count($reader->all()));
        $reader = $this->getReader();
        $reader->in(self::$tmpDir)->extensions(array('cr2'));
        $this->assertEquals(1, count($reader->all()));
        $reader = $this->getReader();
        $reader->in(self::$tmpDir)->extensions(array('jpg'));
        $this->assertEquals(2, count($reader->all()));
        $reader = $this->getReader();
        $reader->in(self::$tmpDir)->extensions('jpg')->extensions('cr2');
        $this->assertEquals(3, count($reader->all()));
        $reader = $this->getReader();
        $reader->in(self::$tmpDir)->extensions(array('jpg'), false);
        $this->assertEquals(1, count($reader->all()));
        $reader = $this->getReader();
        $reader->in(self::$tmpDir)->extensions(array('cr2', 'jpg'), false)->notRecursive();
        $this->assertEquals(0, count($reader->all()));
    }