Skip to content

Commit

Permalink
chevre 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rodber committed Oct 30, 2023
1 parent df272e8 commit 2f69a23
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
],
"require": {
"amphp/parallel": "^1.4",
"chevere/chevere": "^3.3.x-dev"
"chevere/chevere": "^4.0.x-dev"
},
"require-dev": {
"chevere/var-dump": "^0.9",
"chevere/var-dump": "^0.10.x-dev",
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^9.5",
"symplify/easy-coding-standard": "^11.1"
Expand Down
6 changes: 3 additions & 3 deletions tests/FunctionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Chevere\Tests;

use Chevere\Tests\src\TestActionNoParamsIntegerResponse;
use Chevere\Tests\src\TestActionNoParamsIntResponse;
use Chevere\Workflow\Job;
use Chevere\Workflow\Jobs;
use Chevere\Workflow\Workflow;
Expand All @@ -32,15 +32,15 @@ public function testFunctionWorkflow(): void

public function testFunctionSync(): void
{
$action = new TestActionNoParamsIntegerResponse();
$action = new TestActionNoParamsIntResponse();
$job = sync($action);
$alt = new Job($action, true);
$this->assertEquals($alt, $job);
}

public function testFunctionAsync(): void
{
$action = new TestActionNoParamsIntegerResponse();
$action = new TestActionNoParamsIntResponse();
$job = async($action);
$alt = new Job($action, false);
$this->assertEquals($alt, $job);
Expand Down
8 changes: 4 additions & 4 deletions tests/JobTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Chevere\Filesystem\Interfaces\PathInterface;
use Chevere\String\Exceptions\EmptyException;
use Chevere\Tests\src\TestActionNoParams;
use Chevere\Tests\src\TestActionNoParamsIntegerResponse;
use Chevere\Tests\src\TestActionNoParamsIntResponse;
use Chevere\Tests\src\TestActionObjectConflict;
use Chevere\Tests\src\TestActionParam;
use Chevere\Tests\src\TestActionParamStringRegex;
Expand Down Expand Up @@ -126,7 +126,7 @@ public function testWithIsSync(): void

public function testWithDependencies(): void
{
$action = new TestActionNoParamsIntegerResponse();
$action = new TestActionNoParamsIntResponse();
$job = new Job($action);
$this->assertSame([], $job->dependencies()->toArray());
$job = $job->withDepends('foo', 'bar');
Expand All @@ -137,7 +137,7 @@ public function testWithDependencies(): void

public function testWithDependenciesOverflow(): void
{
$action = new TestActionNoParamsIntegerResponse();
$action = new TestActionNoParamsIntResponse();
$job = new Job($action);
$this->assertSame([], $job->dependencies()->toArray());
$this->expectException(OverflowException::class);
Expand All @@ -148,7 +148,7 @@ public function testWithDependenciesOverflow(): void

public function testWithWrongDependencies(): void
{
$action = new TestActionNoParamsIntegerResponse();
$action = new TestActionNoParamsIntResponse();
$job = new Job($action);
$this->assertSame([], $job->dependencies()->toArray());
$this->expectException(EmptyException::class);
Expand Down
6 changes: 3 additions & 3 deletions tests/JobsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Chevere\Parameter\Interfaces\BoolParameterInterface;
use Chevere\Tests\src\TestActionNoParams;
use Chevere\Tests\src\TestActionNoParamsBoolResponses;
use Chevere\Tests\src\TestActionNoParamsIntegerResponse;
use Chevere\Tests\src\TestActionNoParamsIntResponse;
use Chevere\Tests\src\TestActionParamFooResponse1;
use Chevere\Tests\src\TestActionParamFooResponseBar;
use Chevere\Tests\src\TestActionParams;
Expand Down Expand Up @@ -227,7 +227,7 @@ public function testWrongReferenceType(): void
$this->expectExceptionMessage('Reference one:id is of type int, parameter foo expects string at job two');
new Jobs(
one: async(
new TestActionNoParamsIntegerResponse(),
new TestActionNoParamsIntResponse(),
),
two: async(
new TestActionParams(),
Expand Down Expand Up @@ -265,7 +265,7 @@ public function testWithRunIfInvalidJobKeyType(): void
$this->expectException(TypeError::class);
$this->expectExceptionMessage('Reference j1:id must be of type bool');
new Jobs(
j1: async(new TestActionNoParamsIntegerResponse()),
j1: async(new TestActionNoParamsIntResponse()),
j2: async(new TestActionNoParams())
->withRunIf(
response('j1', 'id')
Expand Down
6 changes: 3 additions & 3 deletions tests/RunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Chevere\Container\Container;
use Chevere\Tests\src\TestActionNoParams;
use Chevere\Tests\src\TestActionNoParamsBoolResponses;
use Chevere\Tests\src\TestActionNoParamsIntegerResponse;
use Chevere\Tests\src\TestActionNoParamsIntResponse;
use Chevere\Tests\src\TestActionParamFooResponse1;
use Chevere\Tests\src\TestActionParamsFooBarResponse2;
use Chevere\Throwable\Exceptions\OutOfBoundsException;
Expand Down Expand Up @@ -222,8 +222,8 @@ public function testRunIfReference(): void
$container = new Container();
$job1 = async(new TestActionNoParamsBoolResponses());
$job2 = async(new TestActionNoParamsBoolResponses());
$job3 = async(new TestActionNoParamsIntegerResponse());
$job4 = async(new TestActionNoParamsIntegerResponse());
$job3 = async(new TestActionNoParamsIntResponse());
$job4 = async(new TestActionNoParamsIntResponse());
$workflow = workflow(
job1: $job1,
job2: $job2->withRunIf(response('job1', 'true')),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use function Chevere\Parameter\arrayp;
use function Chevere\Parameter\int;

final class TestActionNoParamsIntegerResponse extends Action
final class TestActionNoParamsIntResponse extends Action
{
public static function acceptResponse(): ParameterInterface
{
Expand Down

0 comments on commit 2f69a23

Please sign in to comment.