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

testArchiveNoLibrary() public method

    public function testArchiveNoLibrary()
    {
        $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');
        chdir('new');
        $app = new Library(array('request' => new Request(), 'classes' => $this->classes));
        $app->library = 'does_not_exist';
        $expected = true;
        $result = $app->archive();
        $this->assertEqual($expected, $result);
        $expected = "new.phar.gz created in {$this->_testPath} from ";
        $expected .= "{$this->_testPath}/new\n";
        $result = $app->response->output;
        $this->assertEqual($expected, $result);
        Phar::unlinkArchive($this->_testPath . '/new.phar');
        Phar::unlinkArchive($this->_testPath . '/new.phar.gz');
        $this->_cleanUp('tests/new');
        rmdir($this->_testPath . '/new');
    }