-
Notifications
You must be signed in to change notification settings - Fork 4
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 #9 from mediact/feature/symfony-compatibility
Composer 1.6 & Symfony 4.0 compatibility
- Loading branch information
Showing
6 changed files
with
105 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
/** | ||
* Copyright MediaCT. All rights reserved. | ||
* https://www.mediact.nl | ||
*/ | ||
|
||
namespace Mediact\TestingSuite\Composer\Factory; | ||
|
||
use Symfony\Component\Process\Process; | ||
|
||
class ProcessFactory implements ProcessFactoryInterface | ||
{ | ||
/** | ||
* Create a new Process instance. | ||
* | ||
* @param string $commandLine | ||
* | ||
* @return Process | ||
*/ | ||
public function create(string $commandLine): Process | ||
{ | ||
return new Process($commandLine); | ||
} | ||
} |
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,21 @@ | ||
<?php | ||
/** | ||
* Copyright MediaCT. All rights reserved. | ||
* https://www.mediact.nl | ||
*/ | ||
|
||
namespace Mediact\TestingSuite\Composer\Factory; | ||
|
||
use Symfony\Component\Process\Process; | ||
|
||
interface ProcessFactoryInterface | ||
{ | ||
/** | ||
* Create a new Process instance. | ||
* | ||
* @param string $commandLine | ||
* | ||
* @return Process | ||
*/ | ||
public function create(string $commandLine): Process; | ||
} |
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,32 @@ | ||
<?php | ||
/** | ||
* Copyright MediaCT. All rights reserved. | ||
* https://www.mediact.nl | ||
*/ | ||
|
||
namespace Mediact\TestingSuite\Composer\Tests\Factory; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Mediact\TestingSuite\Composer\Factory\ProcessFactory; | ||
use Symfony\Component\Process\Process; | ||
|
||
/** | ||
* @coversDefaultClass \Mediact\TestingSuite\Composer\Factory\ProcessFactory | ||
*/ | ||
class ProcessFactoryTest extends TestCase | ||
{ | ||
/** | ||
* @return void | ||
* | ||
* @covers ::create | ||
*/ | ||
public function testCreate() | ||
{ | ||
$factory = new ProcessFactory(); | ||
|
||
$this->assertInstanceOf( | ||
Process::class, | ||
$factory->create('foo') | ||
); | ||
} | ||
} |
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