Пример #1
0
 function _testArchive($extension)
 {
     $filename = "test.{$extension}";
     $this->assertTrue(!PEAR::isError(File_Archive::extract(File_Archive::read('test.php'), File_Archive::toArchive($filename, $compressed = File_Archive::toMemory()))) && !PEAR::isError(File_Archive::extract(File_Archive::readSource($compressed->makeReader(), "{$filename}/test.php"), File_Archive::toVariable($uncompressed))) && $uncompressed == file_get_contents('test.php'));
 }