lithium\tests\cases\console\command\LibraryTest::testArchive PHP Method

testArchive() public method

public testArchive ( )
    public function testArchive()
    {
        $this->skipIf(!extension_loaded('zlib'), 'The zlib extension is not loaded.');
        $this->skipIf(ini_get('phar.readonly') == '1', 'Skipped test {:class}::{:function}() - INI setting phar.readonly = On');
        $this->library->library = 'library_test';
        $expected = true;
        $testPath = "{$this->_testPath}/library_test";
        $result = $this->library->archive($testPath, $testPath);
        $this->assertEqual($expected, $result);
        $expected = "library_test.phar.gz created in {$this->_testPath} from ";
        $expected .= "{$this->_testPath}/library_test\n";
        $result = $this->library->response->output;
        $this->assertEqual($expected, $result);
        Phar::unlinkArchive("{$this->_testPath}/library_test.phar");
    }