Phalcon\Test\Unit\Http\Request\FileTest::testRealType PHP Метод

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

Tests getRealType
С версии: 2013-10-26
Автор: Serghei Iakovlev ([email protected])
Автор: Dreamszhu ([email protected])
public testRealType ( )
    public function testRealType()
    {
        if (!extension_loaded('fileinfo')) {
            $this->markTestSkipped('Warning: fileinfo extension is not loaded');
        }
        $this->specify("getRealType does not returns real type", function () {
            $file = new File(['name' => 'test', 'type' => 'text/plain', 'tmp_name' => PATH_DATA . '/assets/phalconphp.jpg', 'size' => 1, 'error' => 0]);
            expect($file->getType())->equals('text/plain');
            expect($file->getRealType())->equals('image/jpeg');
        });
    }