Skip to content

Commit

Permalink
updated test
Browse files Browse the repository at this point in the history
  • Loading branch information
schmunk42 committed Mar 23, 2017
1 parent 54814be commit 76eceaf
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Tests/Repository/Vcs/GitDriverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public function setUp()
'cache-vcs-dir' => sys_get_temp_dir().'/composer-test-cache',
),
));

// Mock for skip asset
$fs = new Filesystem();
$fs->ensureDirectoryExists(sys_get_temp_dir().'/composer-test-cache/https---github.com-fxpio-composer-asset-plugin.git');
file_put_contents(sys_get_temp_dir().'/composer-test-cache/https---github.com-fxpio-composer-asset-plugin.git/config', '');
}

public function tearDown()
Expand Down Expand Up @@ -151,15 +156,18 @@ public function testPublicRepositoryWithSkipUpdate($type, $filename)
/* @var IOInterface $io */
/* @var ProcessExecutor $process */

$gitDriver = new GitDriver($repoConfig, $io, $this->config, $process, null);
$gitDriver->initialize();
$gitDriver1 = new GitDriver($repoConfig, $io, $this->config, $process, null);
$gitDriver1->initialize();

$gitDriver2 = new GitDriver($repoConfig, $io, $this->config, $process, null);
$gitDriver2->initialize();

$validEmpty = array(
'_nonexistent_package' => true,
);

$composer1 = $gitDriver->getComposerInformation($identifier);
$composer2 = $gitDriver->getComposerInformation($identifier);
$composer1 = $gitDriver1->getComposerInformation($identifier);
$composer2 = $gitDriver2->getComposerInformation($identifier);

$this->assertNotNull($composer1);
$this->assertNotNull($composer2);
Expand Down

0 comments on commit 76eceaf

Please sign in to comment.