Gittern\IntegrationTest::setUp PHP Метод

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

public setUp ( )
    public function setUp()
    {
        VfsStream::setup('Testrepo');
        if (!class_exists('ZipArchive')) {
            $this->markTestSkipped('The ZipArchive class is not available.');
        }
        $zip = new \ZipArchive();
        if ($zip->open(__DIR__ . '/Fixtures/Testrepo.git.zip') === true) {
            $zip->extractTo(VfsStream::url('Testrepo'));
            $zip->close();
        } else {
            $this->markTestSkipped('Couldn\'t extract repo zip');
        }
        $repo_url = VfsStream::url('Testrepo') . '/Testrepo.git';
        $transport = new NativeTransport($repo_url);
        $this->repo = new Repository();
        $this->repo->setTransport($transport);
        $configurator = new Configurator();
        $configurator->defaultConfigure($this->repo);
        $this->master_adapter = new GitternCommitishReadOnlyAdapter($this->repo, "master");
        $this->index_adapter = new GitternIndexAdapter($this->repo);
    }