/** * @test */ public function testGetHexDump() { $file = new Filesystem(); $dir = static::getTempPath(__FUNCTION__); mkdir($dir); $filename = rand(1, 10) . rand(0, getrandmax()); $path = $dir . DIRECTORY_SEPARATOR . $filename; touch($path); $input = '0123456789'; file_put_contents($path, $input); $dumpresult = $file->getHexDump($path); $this->assertEquals($dumpresult[1], '30 31 32 33 34 35 36 37 38 39 '); $this->assertEquals($dumpresult[2], $input); }