Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP: refactoring & tests * WIP: ShoppingListBundle tests & refactorings * WIP: SetupBundle repo test * WIP: more tests * WIP: CustomerBundle tests * WIP: CatalogBundle Tests * feat(Symfony): add missing interface function to data collector to support symfony 4 Closes #48 * WIP: ExampleBundle tests * WIP: StateBundle tests & refactoring * wIP: StateBundle tests * WIP: CtpBundle tests * WIP: ExampleBundle form tests * WIP: ExampleBundle refactor Form Types * WIP: ExampleBundle refactor ProductEntity * WIP: additional tests * WIP: ExampleBundle, Controllers tests * WIP: minor improvements * WIP: add tests for Search * fix dependencies version * chore(travis): add travis build * update to symfony 4.2, fix deprecated
- Loading branch information
Showing
195 changed files
with
10,593 additions
and
832 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ vendor | |
composer.lock | ||
.phan | ||
analysis.txt | ||
/var/ |
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,14 @@ | ||
dist: xenial | ||
sudo: false | ||
language: php | ||
php: | ||
- 7.1 | ||
- 7.2 | ||
- nightly | ||
matrix: | ||
allow_failures: | ||
- php: nightly | ||
before_script: | ||
- composer install | ||
script: | ||
- vendor/bin/phpunit |
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
40 changes: 40 additions & 0 deletions
40
src/CartBundle/Tests/DependencyInjection/CartExtensionTest.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,40 @@ | ||
<?php | ||
/** | ||
* | ||
*/ | ||
|
||
namespace Commercetools\Symfony\CartBundle\Tests\DependencyInjection; | ||
|
||
|
||
use Commercetools\Symfony\CartBundle\DependencyInjection\CartExtension; | ||
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase; | ||
|
||
class CartExtensionTest extends AbstractExtensionTestCase | ||
{ | ||
protected function getContainerExtensions() | ||
{ | ||
return [ | ||
new CartExtension() | ||
]; | ||
} | ||
|
||
public function testExtensionLoads() | ||
{ | ||
$this->load(); | ||
|
||
$this->assertContainerBuilderHasParameter('commercetools.cache.cart', 'false'); | ||
$this->assertContainerBuilderHasParameter('commercetools.cache.shipping_method', 'false'); | ||
$this->assertContainerBuilderHasParameter('commercetools.cache.order', 'false'); | ||
$this->assertContainerBuilderHasParameter('commercetools.cache.payment', 'false'); | ||
|
||
$this->assertContainerBuilderHasService('Commercetools\Symfony\CartBundle\Model\Repository\CartRepository'); | ||
$this->assertContainerBuilderHasService('Commercetools\Symfony\CartBundle\Model\Repository\PaymentRepository'); | ||
$this->assertContainerBuilderHasService('Commercetools\Symfony\CartBundle\Model\Repository\OrderRepository'); | ||
$this->assertContainerBuilderHasService('Commercetools\Symfony\CartBundle\Model\Repository\ShippingMethodRepository'); | ||
|
||
$this->assertContainerBuilderHasService('Commercetools\Symfony\CartBundle\Manager\CartManager'); | ||
$this->assertContainerBuilderHasService('Commercetools\Symfony\CartBundle\Manager\PaymentManager'); | ||
$this->assertContainerBuilderHasService('Commercetools\Symfony\CartBundle\Manager\OrderManager'); | ||
$this->assertContainerBuilderHasService('Commercetools\Symfony\CartBundle\Manager\ShippingMethodManager'); | ||
} | ||
} |
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,20 @@ | ||
<?php | ||
/** | ||
* | ||
*/ | ||
|
||
namespace Commercetools\Symfony\CartBundle\Tests\Event; | ||
|
||
|
||
use Commercetools\Core\Model\Cart\Cart; | ||
use Commercetools\Symfony\CartBundle\Event\CartGetEvent; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class CartGetEventTest extends TestCase | ||
{ | ||
public function testCartGetEvent() | ||
{ | ||
$getEvent = new CartGetEvent(Cart::of()); | ||
$this->assertInstanceOf(Cart::class, $getEvent->getCart()); | ||
} | ||
} |
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,20 @@ | ||
<?php | ||
/** | ||
* | ||
*/ | ||
|
||
namespace Commercetools\Symfony\CartBundle\Tests\Event; | ||
|
||
|
||
use Commercetools\Core\Model\Cart\Cart; | ||
use Commercetools\Symfony\CartBundle\Event\CartPostCreateEvent; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class CartPostCreateEventTest extends TestCase | ||
{ | ||
public function testCartPostCreateEvent() | ||
{ | ||
$postCreateEvent = new CartPostCreateEvent(Cart::of()); | ||
$this->assertInstanceOf(Cart::class, $postCreateEvent->getCart()); | ||
} | ||
} |
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,20 @@ | ||
<?php | ||
/** | ||
* | ||
*/ | ||
|
||
namespace Commercetools\Symfony\CartBundle\Tests\Event; | ||
|
||
|
||
use Commercetools\Core\Model\Payment\Payment; | ||
use Commercetools\Symfony\CartBundle\Event\PaymentPostCreateEvent; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class PaymentPostCreateEventTest extends TestCase | ||
{ | ||
public function testPaymentPostCreateEvent() | ||
{ | ||
$event = new PaymentPostCreateEvent(Payment::of()); | ||
$this->assertInstanceOf(Payment::class, $event->getPayment()); | ||
} | ||
} |
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,22 @@ | ||
<?php | ||
/** | ||
* | ||
*/ | ||
|
||
namespace Commercetools\Symfony\CartBundle\Tests\Event; | ||
|
||
|
||
use Commercetools\Core\Model\Payment\Payment; | ||
use Commercetools\Core\Request\Payments\Command\PaymentSetCustomerAction; | ||
use Commercetools\Symfony\CartBundle\Event\PaymentPostUpdateEvent; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class PaymentPostUpdateEventTest extends TestCase | ||
{ | ||
public function testPaymentPostUpdateEvent() | ||
{ | ||
$event = new PaymentPostUpdateEvent(Payment::of(), [PaymentSetCustomerAction::of()]); | ||
$this->assertInstanceOf(Payment::class, $event->getPayment()); | ||
$this->assertInstanceOf(PaymentSetCustomerAction::class, current($event->getActions())); | ||
} | ||
} |
Oops, something went wrong.