forked from coenjacobs/mozart
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81bdb99
commit ebb1a86
Showing
3 changed files
with
166 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,62 @@ | ||
<?php | ||
/** | ||
* @see https://github.com/BrianHenryIE/strauss/issues/44 | ||
*/ | ||
|
||
namespace BrianHenryIE\Strauss\Tests\Issues; | ||
|
||
use BrianHenryIE\Strauss\Console\Commands\Compose; | ||
use Exception; | ||
use Symfony\Component\Console\Input\InputInterface; | ||
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* @package BrianHenryIE\Strauss\Tests\Issues | ||
* @coversNothing | ||
*/ | ||
class StraussIssue44Test extends \BrianHenryIE\Strauss\Tests\Integration\Util\IntegrationTestCase | ||
{ | ||
|
||
/** | ||
* Unprefixed static function call in ternary operation. | ||
* | ||
* @author BrianHenryIE | ||
*/ | ||
public function testStaticIsNotPrefixed() | ||
{ | ||
|
||
$composerJsonString = <<<'EOD' | ||
{ | ||
"name": "brianhenryie/strauss-issue-44", | ||
"require": { | ||
"guzzlehttp/guzzle": "7.4.5" | ||
}, | ||
"extra": { | ||
"strauss": { | ||
"namespace_prefix": "Strauss\\Issue44\\", | ||
"classmap_prefix": "Strauss_Issue44_" | ||
} | ||
} | ||
} | ||
EOD; | ||
|
||
file_put_contents($this->testsWorkingDir . 'composer.json', $composerJsonString); | ||
|
||
chdir($this->testsWorkingDir); | ||
|
||
exec('composer install'); | ||
|
||
$inputInterfaceMock = $this->createMock(InputInterface::class); | ||
$outputInterfaceMock = $this->createMock(OutputInterface::class); | ||
|
||
$strauss = new Compose(); | ||
|
||
$result = $strauss->run($inputInterfaceMock, $outputInterfaceMock); | ||
|
||
$php_string = file_get_contents($this->testsWorkingDir . 'strauss/guzzlehttp/guzzle/src/BodySummarizer.php'); | ||
|
||
$this->assertStringNotContainsString('? \GuzzleHttp\Psr7\Message::bodySummary($message)', $php_string); | ||
|
||
$this->assertStringContainsString('? \Strauss\Issue44\GuzzleHttp\Psr7\Message::bodySummary($message)', $php_string); | ||
} | ||
} |
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