forked from coenjacobs/mozart
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use permission
0755
for vendor-prefixed
- Loading branch information
1 parent
1cdb99c
commit c9fa47e
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* `vendor-prefixed` directory permissions changed after Flysystem update. | ||
* | ||
* @see https://github.com/BrianHenryIE/strauss/issues/104 | ||
*/ | ||
|
||
namespace BrianHenryIE\Strauss\Tests\Issues; | ||
|
||
use BrianHenryIE\Strauss\Tests\Integration\Util\IntegrationTestCase; | ||
|
||
/** | ||
* @package BrianHenryIE\Strauss\Tests\Issues | ||
* @coversNothing | ||
*/ | ||
class StraussIssue104Test extends IntegrationTestCase | ||
{ | ||
public function test_correct_directory_permission() | ||
{ | ||
$composerJsonString = <<<'EOD' | ||
{ | ||
"name": "strauss/issue104", | ||
"require": { | ||
"psr/log": "1.0.0" | ||
}, | ||
"extra": { | ||
"strauss": { | ||
"namespace_prefix": "Strauss\\Issue104\\" | ||
} | ||
} | ||
} | ||
EOD; | ||
|
||
chdir($this->testsWorkingDir); | ||
|
||
file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); | ||
|
||
exec('composer install'); | ||
|
||
$this->runStrauss(); | ||
|
||
$result = substr(sprintf('%o', fileperms($this->testsWorkingDir . '/vendor-prefixed')), -4); | ||
|
||
self::assertEquals('0755', $result); | ||
} | ||
} |