Skip to content

Commit

Permalink
feat(laravel-infrastructure): update composer (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
abenevaut authored Mar 16, 2024
1 parent 54380f0 commit b3aeaf4
Show file tree
Hide file tree
Showing 10 changed files with 75 additions and 96 deletions.
9 changes: 9 additions & 0 deletions .idea/opensource.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/phpspec.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/phpunit.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions laravel-infrastructure/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"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 || ^10 || ^11"
},
Expand Down
43 changes: 17 additions & 26 deletions laravel-infrastructure/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>

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions laravel-infrastructure/tests/Unit/ExampleTest.php

This file was deleted.

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 b3aeaf4

Please sign in to comment.