Gittern\Transport\NativeTransportTest::setUp PHP Méthode

setUp() public méthode

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');
        }
        $this->repo = VfsStream::url('Testrepo') . '/Testrepo.git';
        $this->transport = new NativeTransport($this->repo);
    }