mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Merge branch '1.8'
* 1.8: Remove pamil/prophecy-common from require-dev dependencies
This commit is contained in:
commit
3183f9fd36
4 changed files with 24 additions and 7 deletions
|
|
@ -131,7 +131,6 @@
|
|||
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"mockery/mockery": "^1.4",
|
||||
"pamil/prophecy-common": "^0.1",
|
||||
"phpspec/phpspec": "^7.0",
|
||||
"phpstan/phpstan": "0.12.56",
|
||||
"phpstan/phpstan-doctrine": "0.12.22",
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
"zendframework/zend-stdlib": "^3.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"pamil/prophecy-common": "^0.1",
|
||||
"phpspec/phpspec": "^7.0"
|
||||
},
|
||||
"config": {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace spec\Sylius\Component\Channel\Context;
|
||||
|
||||
use Pamil\ProphecyCommon\Promise\CompositePromise;
|
||||
use PhpSpec\ObjectBehavior;
|
||||
use Sylius\Component\Channel\Context\ChannelContextInterface;
|
||||
use Sylius\Component\Channel\Context\ChannelNotFoundException;
|
||||
|
|
@ -116,7 +115,30 @@ final class CachedPerRequestChannelContextSpec extends ObjectBehavior
|
|||
|
||||
$decoratedChannelContext
|
||||
->getChannel()
|
||||
->will(CompositePromise::it()->willThrow(ChannelNotFoundException::class)->andThenReturn($channel))
|
||||
->will(new class ($channel->getWrappedObject()) {
|
||||
/** @var int */
|
||||
private $counter = 0;
|
||||
|
||||
/** @var ChannelInterface */
|
||||
private $channel;
|
||||
|
||||
public function __construct(ChannelInterface $channel) {
|
||||
$this->channel = $channel;
|
||||
}
|
||||
|
||||
/** @throws ChannelNotFoundException */
|
||||
public function __invoke(): ChannelInterface
|
||||
{
|
||||
$currentCounter = $this->counter;
|
||||
++$this->counter;
|
||||
|
||||
if ($currentCounter === 0) {
|
||||
throw new ChannelNotFoundException();
|
||||
}
|
||||
|
||||
return $this->channel;
|
||||
}
|
||||
})
|
||||
->shouldBeCalledTimes(2)
|
||||
;
|
||||
|
||||
|
|
|
|||
|
|
@ -402,9 +402,6 @@
|
|||
"pagerfanta/pagerfanta": {
|
||||
"version": "v2.4.1"
|
||||
},
|
||||
"pamil/prophecy-common": {
|
||||
"version": "v0.1.0"
|
||||
},
|
||||
"paragonie/random_compat": {
|
||||
"version": "v2.0.18"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue