-
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.
Update master to output generated at b3aeaf4
- Loading branch information
Showing
8 changed files
with
56 additions
and
96 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
cacheResultFile=".phpunit.cache/test-results" | ||
executionOrder="depends,defects" | ||
forceCoversAnnotation="false" | ||
beStrictAboutCoversAnnotation="true" | ||
beStrictAboutOutputDuringTests="true" | ||
beStrictAboutTodoAnnotatedTests="true" | ||
failOnRisky="true" failOnWarning="true" | ||
verbose="true"> | ||
<coverage> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
<report> | ||
<clover outputFile="coverage/clover.xml"/> | ||
</report> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="Package Test Suite"> | ||
<directory suffix=".php">./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<logging/> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" bootstrap="vendor/autoload.php" executionOrder="depends,defects" beStrictAboutOutputDuringTests="true" failOnRisky="true" failOnWarning="true" cacheDirectory=".phpunit.cache" requireCoverageMetadata="false" beStrictAboutCoverageMetadata="true"> | ||
<coverage> | ||
<report> | ||
<clover outputFile="coverage/clover.xml"/> | ||
</report> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="Package Test Suite"> | ||
<directory suffix=".php">./tests/Unit</directory> | ||
</testsuite> | ||
</testsuites> | ||
<logging/> | ||
<source> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</source> | ||
</phpunit> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,33 @@ | ||
<?php | ||
|
||
namespace Tests\Unit; | ||
|
||
use abenevaut\Infrastructure\Console\ProcessPoolCommandAbstract; | ||
use PHPUnit\Framework\TestCase; | ||
use Symfony\Component\Process\Process; | ||
|
||
class ProcessPoolCommandAbstractTest extends TestCase | ||
{ | ||
public function testQueueLengthIsDefinedToZero() | ||
{ | ||
$stub = $this->createPartialMock(ProcessPoolCommandAbstract::class, ['boot', 'defaultConcurrency']); | ||
|
||
$this->assertIsInt($stub->getQueueLength()); | ||
$this->assertEquals(0, $stub->getQueueLength()); | ||
$this->assertSame("0 process to compute", $stub->title()); | ||
} | ||
|
||
public function testToAddTowProcesses() | ||
{ | ||
$stub = $this->createPartialMock(ProcessPoolCommandAbstract::class, ['boot', 'defaultConcurrency']); | ||
|
||
$stub->push([ | ||
new Process(['ls']), | ||
new Process(['ls', '-la']), | ||
]); | ||
|
||
$this->assertIsInt($stub->getQueueLength()); | ||
$this->assertEquals(2, $stub->getQueueLength()); | ||
$this->assertSame("2 process to compute", $stub->title()); | ||
} | ||
} |