-
Notifications
You must be signed in to change notification settings - Fork 157
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 #458 from BitBagCommerce/feature/add-sylius-1.12-s…
…upport Feature/add sylius 1.12 support
- Loading branch information
Showing
95 changed files
with
472 additions
and
601 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
50 changes: 50 additions & 0 deletions
50
spec/MediaProvider/GenericProviderSpec.php~refs/remotes/origin/master
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 was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace spec\BitBag\SyliusCmsPlugin\MediaProvider; | ||
|
||
use BitBag\SyliusCmsPlugin\Entity\MediaInterface; | ||
use BitBag\SyliusCmsPlugin\MediaProvider\GenericProvider; | ||
use BitBag\SyliusCmsPlugin\MediaProvider\ProviderInterface; | ||
use BitBag\SyliusCmsPlugin\Uploader\MediaUploaderInterface; | ||
use PhpSpec\ObjectBehavior; | ||
use Twig\Environment; | ||
|
||
final class GenericProviderSpec extends ObjectBehavior | ||
{ | ||
public function let( | ||
MediaUploaderInterface $uploader, | ||
Environment $twigEngine | ||
) { | ||
$this->beConstructedWith($uploader, $twigEngine, '@Template', '/media/'); | ||
} | ||
|
||
public function it_is_initializable(): void | ||
{ | ||
$this->shouldHaveType(GenericProvider::class); | ||
} | ||
|
||
public function it_implements_provider_interface(): void | ||
{ | ||
$this->shouldHaveType(ProviderInterface::class); | ||
} | ||
|
||
public function it_renders(MediaInterface $media, Environment $twigEngine): void | ||
{ | ||
$twigEngine->render('@Template', ['media' => $media, 'config' => []])->willReturn('content'); | ||
|
||
$this->render($media, '@Template', ['config' => []])->shouldReturn('content'); | ||
} | ||
|
||
public function it_uploads(MediaInterface $media, MediaUploaderInterface $uploader): void | ||
{ | ||
$uploader->upload($media, '/media/')->shouldNotBeCalled(); | ||
} | ||
} |
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
Oops, something went wrong.