-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #556 from Landerstraeten/composer-dependency
Move composer dependency to dev
- Loading branch information
Showing
10 changed files
with
206 additions
and
206 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
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,75 @@ | ||
<?php | ||
|
||
namespace spec\GrumPHP\Util; | ||
|
||
use GrumPHP\Util\ComposerFile; | ||
use PhpSpec\ObjectBehavior; | ||
|
||
class ComposerFileSpec extends ObjectBehavior | ||
{ | ||
function it_is_initializable() | ||
{ | ||
$this->beConstructedWith([ | ||
'config' => [ | ||
'sort-packages' => true, | ||
] | ||
]); | ||
$this->shouldHaveType(ComposerFile::class); | ||
} | ||
|
||
function it_should_create_itself_from_a_composer_file_location() | ||
{ | ||
$this->beConstructedThrough('createFrom', ['composer.json']); | ||
$this->ensureProjectBinDirInSystemPath()->shouldBe(true); | ||
} | ||
|
||
function it_should_have_a_default_bin_dir() | ||
{ | ||
$this->beConstructedWith([ | ||
'config' => [ | ||
'sort-packages' => true, | ||
] | ||
]); | ||
|
||
$this->getBinDir()->shouldBe('vendor/bin'); | ||
} | ||
|
||
function it_should_have_a_custom_bin_dir() | ||
{ | ||
$this->beConstructedWith([ | ||
'config' => [ | ||
'sort-packages' => true, | ||
'bin-dir' => 'bin' | ||
] | ||
]); | ||
|
||
$this->getBinDir()->shouldBe('bin'); | ||
} | ||
|
||
function it_should_have_a_default_config_path() | ||
{ | ||
$this->beConstructedWith([ | ||
'config' => [ | ||
'sort-packages' => true, | ||
] | ||
]); | ||
|
||
$this->getConfigDefaultPath()->shouldBe(null); | ||
} | ||
|
||
function it_should_have_a_custom_config_path() | ||
{ | ||
$this->beConstructedWith([ | ||
'config' => [ | ||
'sort-packages' => true, | ||
], | ||
'extra' => [ | ||
'grumphp' => [ | ||
'config-default-path' => 'some/folder' | ||
] | ||
] | ||
]); | ||
|
||
$this->getConfigDefaultPath()->shouldBe('some/folder'); | ||
} | ||
} |
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
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
Oops, something went wrong.