This repository has been archived by the owner on Aug 3, 2018. It is now read-only.
forked from Lakion/SyliusElasticSearchBundle
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Sylius/tweak-api-response
[API] Tweak api response
- Loading branch information
Showing
41 changed files
with
1,703 additions
and
199 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace spec\Sylius\ElasticSearchPlugin\Document; | ||
|
||
use Sylius\ElasticSearchPlugin\Document\Image; | ||
use PhpSpec\ObjectBehavior; | ||
|
||
final class ImageSpec extends ObjectBehavior | ||
{ | ||
function it_is_initializable() | ||
{ | ||
$this->shouldHaveType(Image::class); | ||
} | ||
|
||
function it_has_code() | ||
{ | ||
$this->setCode('abc'); | ||
|
||
$this->getCode()->shouldReturn('abc'); | ||
} | ||
|
||
function it_has_path() | ||
{ | ||
$this->setPath('/abc'); | ||
|
||
$this->getPath()->shouldReturn('/abc'); | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
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,51 @@ | ||
<?php | ||
|
||
namespace spec\Sylius\ElasticSearchPlugin\Document; | ||
|
||
use ONGR\ElasticsearchBundle\Collection\Collection; | ||
use Sylius\ElasticSearchPlugin\Document\Taxon; | ||
use PhpSpec\ObjectBehavior; | ||
|
||
final class TaxonSpec extends ObjectBehavior | ||
{ | ||
function it_is_initializable() | ||
{ | ||
$this->shouldHaveType(Taxon::class); | ||
} | ||
|
||
function it_has_code() | ||
{ | ||
$this->setCode('mug'); | ||
|
||
$this->getCode()->shouldReturn('mug'); | ||
} | ||
|
||
function it_has_slug() | ||
{ | ||
$this->setSlug('/mug'); | ||
|
||
$this->getSlug()->shouldReturn('/mug'); | ||
} | ||
|
||
function it_has_position() | ||
{ | ||
$this->setPosition(1); | ||
|
||
$this->getPosition()->shouldReturn(1); | ||
} | ||
|
||
function it_has_images() | ||
{ | ||
$images = new Collection(); | ||
$this->setImages($images); | ||
|
||
$this->getImages()->shouldReturn($images); | ||
} | ||
|
||
function it_has_description() | ||
{ | ||
$this->setDescription('Lorem ipsum'); | ||
|
||
$this->getDescription()->shouldReturn('Lorem ipsum'); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Sylius\ElasticSearchPlugin\Controller; | ||
|
||
final class ImageItemView | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
public $code; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $path; | ||
} |
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,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Sylius\ElasticSearchPlugin\Controller; | ||
|
||
final class PriceView | ||
{ | ||
/** | ||
* @var int | ||
*/ | ||
public $current; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $currency; | ||
} |
Oops, something went wrong.