-
Notifications
You must be signed in to change notification settings - Fork 1
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
4f93a5f
commit 6c42d7e
Showing
8 changed files
with
154 additions
and
7 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,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" | ||
beStrictAboutChangesToGlobalState="true" | ||
beStrictAboutOutputDuringTests="true" | ||
beStrictAboutTodoAnnotatedTests="true" | ||
colors="true" | ||
columns="max" | ||
verbose="true" | ||
> | ||
<testsuites> | ||
<testsuite name="all"> | ||
<directory>./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<listeners> | ||
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/> | ||
</listeners> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory>./src</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
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 | ||
|
||
/* | ||
* This file is part of CLI Executor. | ||
* | ||
* (c) Dariusz Rumiński <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Keradus\Tests; | ||
|
||
use Keradus\CliExecutor\CommandExecutor; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
/** | ||
* @covers \Keradus\CliExecutor\CommandExecutor | ||
* | ||
* @internal | ||
*/ | ||
class CommandExecutorTest extends TestCase | ||
{ | ||
public function testSimpleExecution() | ||
{ | ||
$scriptExecutor = CommandExecutor::create('ls -l', __DIR__); | ||
|
||
$cliResult = $scriptExecutor->getResult(); | ||
|
||
$this->assertContains(basename(__FILE__), $cliResult->getOutput()); | ||
} | ||
} |
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 | ||
|
||
/* | ||
* This file is part of CLI Executor. | ||
* | ||
* (c) Dariusz Rumiński <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Keradus\Tests; | ||
|
||
use Keradus\CliExecutor\ScriptExecutor; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
/** | ||
* @covers \Keradus\CliExecutor\ScriptExecutor | ||
* | ||
* @internal | ||
*/ | ||
class ScriptExecutorTest extends TestCase | ||
{ | ||
public function testSimpleExecution() | ||
{ | ||
$scriptExecutor = ScriptExecutor::create(array('ls'), __DIR__); | ||
|
||
$cliResult = $scriptExecutor->getResult(); | ||
|
||
$this->assertContains(basename(__FILE__), $cliResult->getOutput()); | ||
} | ||
} |