mirror of
https://github.com/jbcr/SyliusElasticsearchPlugin.git
synced 2026-03-24 17:02:15 +01:00
44 lines
1020 B
PHP
44 lines
1020 B
PHP
<?php
|
|
|
|
/*
|
|
* This file has been created by developers from BitBag.
|
|
* Feel free to contact us once you face any issues or want to start
|
|
* another great project.
|
|
* You can find more information about us on https://bitbag.shop and write us
|
|
* an email on mikolaj.krol@bitbag.pl.
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace spec\BitBag\SyliusElasticsearchPlugin\Controller\Response;
|
|
|
|
use BitBag\SyliusElasticsearchPlugin\Controller\Response\DTO\Item;
|
|
use PhpSpec\ObjectBehavior;
|
|
|
|
final class ItemsResponseSpec extends ObjectBehavior
|
|
{
|
|
function let(): void
|
|
{
|
|
$this->beConstructedThrough('createEmpty');
|
|
}
|
|
|
|
function it_can_add_items(): void
|
|
{
|
|
$this->addItem(new Item(
|
|
'Super cars',
|
|
'McLaren F1',
|
|
'Very quirky super-car',
|
|
'/mc-laren/f1',
|
|
'$22,000,000.00',
|
|
''
|
|
));
|
|
|
|
$this->all()->shouldHaveCount(1);
|
|
}
|
|
|
|
function it_returns_an_array(): void
|
|
{
|
|
$this->toArray()->shouldBeArray();
|
|
}
|
|
}
|