Skip to content

Commit

Permalink
Update master to output generated at b3aeaf4
Browse files Browse the repository at this point in the history
  • Loading branch information
abenevaut committed Mar 16, 2024
1 parent 84ed947 commit 2b0d5bd
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 96 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:

- name: Checkout project
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"mortexa/laravel-arkitect": "^0.4"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"mockery/mockery": "^1.5",
"squizlabs/php_codesniffer": "^3.7",
"phpunit/phpunit": "^10.5",
"mockery/mockery": "^1.6",
"squizlabs/php_codesniffer": "^3.9",
"icanhazstring/composer-unused": "^0.8.5",
"laravel/framework": "^9.45"
"laravel/framework": "^9.45 || ^10 || ^11"
},
"autoload": {
"psr-4": {
Expand Down
43 changes: 17 additions & 26 deletions phpunit.xml
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>
12 changes: 0 additions & 12 deletions src/Console/ValidateCommandArgumentsInterface.php

This file was deleted.

39 changes: 0 additions & 39 deletions src/Console/ValidateCommandArgumentsTrait.php

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Architecture/CommandsContractsAreAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static function rule(): ArchRule
{
return Rule::allClasses()
->that(new ResideInOneOfTheseNamespaces('abenevaut\Infrastructure\Console'))
->should(new IsAbstract())
->should(new IsAbstract()) // | new IsInterface() | new IsTrait()
->because('we want to be sure that commands contracts are abstract');
}

Expand Down
13 changes: 0 additions & 13 deletions tests/Unit/ExampleTest.php

This file was deleted.

33 changes: 33 additions & 0 deletions tests/Unit/ProcessPoolCommandAbstractTest.php
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());
}
}

0 comments on commit 2b0d5bd

Please sign in to comment.