From cd8c5882372cdb35c25f1ea2542f4b2f904574f4 Mon Sep 17 00:00:00 2001 From: sebprt Date: Mon, 20 Nov 2023 15:54:23 +0100 Subject: [PATCH] Updated constraints (used new interfaces) --- src/Constraint/Pipeline/PipelineExtractsLike.php | 8 ++++---- src/Constraint/Pipeline/PipelineLoadsLike.php | 16 ++++++++-------- .../Pipeline/PipelineTransformsLike.php | 16 ++++++++-------- src/Constraint/Pipeline/PipelineWritesFile.php | 16 ++++++++-------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/Constraint/Pipeline/PipelineExtractsLike.php b/src/Constraint/Pipeline/PipelineExtractsLike.php index 82c0e67..d9d5794 100644 --- a/src/Constraint/Pipeline/PipelineExtractsLike.php +++ b/src/Constraint/Pipeline/PipelineExtractsLike.php @@ -5,8 +5,8 @@ namespace Kiboko\Component\PHPUnitExtension\Constraint\Pipeline; use Kiboko\Contract\Pipeline\ExtractorInterface; -use Kiboko\Contract\Pipeline\NullRejection; -use Kiboko\Contract\Pipeline\NullState; +use Kiboko\Contract\Pipeline\NullStepRejection; +use Kiboko\Contract\Pipeline\NullStepState; use Kiboko\Contract\Pipeline\PipelineRunnerInterface; use PHPUnit\Framework\Constraint\Constraint; @@ -67,8 +67,8 @@ public function matches($other): bool $iterator = $this->runner->run( $this->asIterator($extract), $this->passThroughCoroutine(), - new NullRejection(), - new NullState(), + new NullStepRejection(), + new NullStepState(), ); $both->attachIterator($iterator); diff --git a/src/Constraint/Pipeline/PipelineLoadsLike.php b/src/Constraint/Pipeline/PipelineLoadsLike.php index 728e077..5e7c7d2 100644 --- a/src/Constraint/Pipeline/PipelineLoadsLike.php +++ b/src/Constraint/Pipeline/PipelineLoadsLike.php @@ -6,8 +6,8 @@ use Kiboko\Contract\Pipeline\FlushableInterface; use Kiboko\Contract\Pipeline\LoaderInterface; -use Kiboko\Contract\Pipeline\NullRejection; -use Kiboko\Contract\Pipeline\NullState; +use Kiboko\Contract\Pipeline\NullStepRejection; +use Kiboko\Contract\Pipeline\NullStepState; use Kiboko\Contract\Pipeline\PipelineRunnerInterface; use PHPUnit\Framework\Constraint\Constraint; @@ -67,8 +67,8 @@ public function matches($other): bool $this->runner->run( $this->asIterator($this->source), $other->load(), - new NullRejection(), - new NullState(), + new NullStepRejection(), + new NullStepState(), ) ); $iterator->append( @@ -78,16 +78,16 @@ public function matches($other): bool yield; yield $other->flush(); })(), - new NullRejection(), - new NullState(), + new NullStepRejection(), + new NullStepState(), ) ); } else { $iterator = $this->runner->run( $this->asIterator($this->source), $other->load(), - new NullRejection(), - new NullState(), + new NullStepRejection(), + new NullStepState(), ); } $both->attachIterator($iterator); diff --git a/src/Constraint/Pipeline/PipelineTransformsLike.php b/src/Constraint/Pipeline/PipelineTransformsLike.php index 8a1bbfd..fb1f8b5 100644 --- a/src/Constraint/Pipeline/PipelineTransformsLike.php +++ b/src/Constraint/Pipeline/PipelineTransformsLike.php @@ -5,8 +5,8 @@ namespace Kiboko\Component\PHPUnitExtension\Constraint\Pipeline; use Kiboko\Contract\Pipeline\FlushableInterface; -use Kiboko\Contract\Pipeline\NullRejection; -use Kiboko\Contract\Pipeline\NullState; +use Kiboko\Contract\Pipeline\NullStepRejection; +use Kiboko\Contract\Pipeline\NullStepState; use Kiboko\Contract\Pipeline\PipelineRunnerInterface; use Kiboko\Contract\Pipeline\TransformerInterface; use PHPUnit\Framework\Constraint\Constraint; @@ -67,8 +67,8 @@ public function matches($other): bool $this->runner->run( $this->asIterator($this->source), $other->transform(), - new NullRejection(), - new NullState(), + new NullStepRejection(), + new NullStepState(), ) ); $iterator->append( @@ -78,16 +78,16 @@ public function matches($other): bool yield; yield $other->flush(); })(), - new NullRejection(), - new NullState(), + new NullStepRejection(), + new NullStepState(), ) ); } else { $iterator = $this->runner->run( $this->asIterator($this->source), $other->transform(), - new NullRejection(), - new NullState(), + new NullStepRejection(), + new NullStepState(), ); } $both->attachIterator($iterator); diff --git a/src/Constraint/Pipeline/PipelineWritesFile.php b/src/Constraint/Pipeline/PipelineWritesFile.php index f64dbc9..fd2c738 100644 --- a/src/Constraint/Pipeline/PipelineWritesFile.php +++ b/src/Constraint/Pipeline/PipelineWritesFile.php @@ -6,8 +6,8 @@ use Kiboko\Contract\Pipeline\FlushableInterface; use Kiboko\Contract\Pipeline\LoaderInterface; -use Kiboko\Contract\Pipeline\NullRejection; -use Kiboko\Contract\Pipeline\NullState; +use Kiboko\Contract\Pipeline\NullStepRejection; +use Kiboko\Contract\Pipeline\NullStepState; use Kiboko\Contract\Pipeline\PipelineRunnerInterface; use PHPUnit\Framework\Constraint\Constraint; use PHPUnit\Framework\Constraint\FileExists; @@ -58,8 +58,8 @@ public function matches($other): bool $this->runner->run( $this->asIterator($this->source), $other->load(), - new NullRejection(), - new NullState(), + new NullStepRejection(), + new NullStepState(), ) ); $iterator->append( @@ -69,16 +69,16 @@ public function matches($other): bool yield; yield $other->flush(); })(), - new NullRejection(), - new NullState(), + new NullStepRejection(), + new NullStepState(), ) ); } else { $iterator = $this->runner->run( $this->asIterator($this->source), $other->load(), - new NullRejection(), - new NullState(), + new NullStepRejection(), + new NullStepState(), ); }