forked from Sylius/Sylius
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace code to iri in ChangePaymentMethod and change id to code in P…
…aymentMethod
- Loading branch information
Showing
9 changed files
with
69 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/Sylius/Bundle/ApiBundle/spec/Map/CommandItemIriArgumentToIdentifierMapSpec.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Sylius package. | ||
* | ||
* (c) Paweł Jędrzejewski | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace spec\Sylius\Bundle\ApiBundle\Map; | ||
|
||
use PhpSpec\ObjectBehavior; | ||
use Sylius\Bundle\ApiBundle\Map\CommandItemIriArgumentToIdentifierMap; | ||
use Sylius\Bundle\ApiBundle\Map\CommandItemIriArgumentToIdentifierMapInterface; | ||
use Webmozart\Assert\Assert; | ||
|
||
final class CommandItemIriArgumentToIdentifierMapSpec extends ObjectBehavior | ||
{ | ||
function let(): void | ||
{ | ||
$this->beConstructedWith(['Sylius\Bundle\ApiBundle\Command\Cart\PickupCart' => 'token']); | ||
} | ||
|
||
function it_is_command_item_iri_argument_to_identifier_map(): void | ||
{ | ||
$this->shouldImplement(CommandItemIriArgumentToIdentifierMapInterface::class); | ||
} | ||
|
||
function it_get_element(): void | ||
{ | ||
$map = new CommandItemIriArgumentToIdentifierMap(['Sylius\Bundle\ApiBundle\Command\Cart\PickupCart' => 'token']); | ||
Assert::same('token', $map->get('Sylius\Bundle\ApiBundle\Command\Cart\PickupCart')); | ||
} | ||
|
||
function it_has_element(): void | ||
{ | ||
$map = new CommandItemIriArgumentToIdentifierMap(['Sylius\Bundle\ApiBundle\Command\Cart\PickupCart' => 'token']); | ||
Assert::true($map->has('Sylius\Bundle\ApiBundle\Command\Cart\PickupCart')); | ||
} | ||
|
||
function it_has_not_element(): void | ||
{ | ||
$map = new CommandItemIriArgumentToIdentifierMap(['Sylius\Bundle\ApiBundle\Command\Cart\PickupCart' => 'token']); | ||
Assert::false($map->has('Sylius\Bundle\ApiBundle\Command\Cart\CreateCart')); | ||
} | ||
} |