Skip to content

Commit

Permalink
Merge pull request #48 from hirak/bugfix/outputfile
Browse files Browse the repository at this point in the history
Bugfix/outputfile
  • Loading branch information
hirak committed Feb 10, 2016
2 parents c4e4767 + 0746fe6 commit 614ea9f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ vendor/
node_modules/
npm-debug.log
phpunit.xml
.idea/
2 changes: 1 addition & 1 deletion src/Aspects/GitLabRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

use Composer\IO;
use Composer\Config as CConfig;
use Composer\Composer;
use Composer\Util;
use Composer\Downloader;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/OutputFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function createDir($fileName)
$createdDirs[] = $dir;
} while (!file_exists($dir));
array_pop($createdDirs);
$this->createdDirs = array_reverse($createdDirs);
$this->createdDirs = $createdDirs;

$targetdir = dirname($fileName);
if (!file_exists($targetdir)) {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/OutputFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ protected function setUp()

public function testNewAndAutoClean()
{
$fileName = 'tests/workspace/test/example.txt';
$fileName = 'tests/workspace/test/foo/example.txt';
self::assertFileNotExists($fileName);
$outputFile = new OutputFile($fileName);
self::assertInstanceOf('Hirak\Prestissimo\OutputFile', $outputFile);
Expand All @@ -20,7 +20,7 @@ public function testNewAndAutoClean()
unset($outputFile); // auto clean

self::assertFileNotExists($fileName);
self::assertFileNotExists(dirname($fileName));
self::assertFileNotExists('tests/workspace/test');
}

/**
Expand Down

0 comments on commit 614ea9f

Please sign in to comment.