eZ\Publish\Core\REST\Common\Tests\FieldTypeProcessor\BinaryInputProcessorTest::testPreProcessValueHash PHP Метод

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

    public function testPreProcessValueHash()
    {
        $processor = $this->getProcessor();
        $fileContent = '42';
        $inputHash = array('data' => base64_encode($fileContent));
        $outputHash = $processor->preProcessValueHash($inputHash);
        $this->assertFalse(isset($outputHash['data']), 'Data found in input hash');
        $this->assertTrue(isset($outputHash['inputUri']), 'No path found in output hash');
        $this->assertTrue(file_exists($outputHash['inputUri']), "The output path {$outputHash['inputUri']} does not exist");
        $this->assertEquals($fileContent, file_get_contents($outputHash['inputUri']));
    }