Skip to content

Commit

Permalink
Merge branch '1.1'
Browse files Browse the repository at this point in the history
* 1.1:
  Update ApiTestCase to ^2.0
  Use "^" instead of "~" wherever possible
  Update SymfonyTest libraries in packages
  Update packages PHPUnit to ^6.5
  Upgrade tests to PHPUnit 6 and fix the broken ones
  • Loading branch information
pamil committed Mar 15, 2018
2 parents aea89bd + bc17d45 commit f97e88e
Show file tree
Hide file tree
Showing 67 changed files with 140 additions and 100 deletions.
4 changes: 2 additions & 2 deletions src/Sylius/Bundle/AddressingBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"symfony/dependency-injection": "^3.4",
"symfony/form": "^3.4",
"symfony/validator": "^3.4",
"phpunit/phpunit": "^5.6",
"phpunit/phpunit": "^6.5",
"symfony/browser-kit": "^3.4",
"incenteev/composer-parameter-handler": "~2.0",
"incenteev/composer-parameter-handler": "^2.0",
"polishsymfonycommunity/symfony-mocker-container": "^1.0"
},
"conflict": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\AdminApiBundle\Fixture\ApiAccessTokenFixture;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;

final class ApiAccessTokenFixtureTest extends \PHPUnit_Framework_TestCase
final class ApiAccessTokenFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\AdminApiBundle\Fixture\ApiClientFixture;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;

class OAuthCredentialsFixtureTest extends \PHPUnit_Framework_TestCase
final class ApiClientFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
2 changes: 1 addition & 1 deletion src/Sylius/Bundle/AdminApiBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"require-dev": {
"doctrine/orm": "^2.5",
"phpspec/phpspec": "^4.0",
"phpunit/phpunit": "^5.6",
"phpunit/phpunit": "^6.5",
"symfony/dependency-injection": "^3.4",
"twig/twig": "^2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\ConnectException;
use Http\Message\MessageFactory;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
Expand All @@ -24,7 +25,7 @@
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;

final class NotificationControllerTest extends \PHPUnit_Framework_TestCase
final class NotificationControllerTest extends TestCase
{
/**
* @var ClientInterface
Expand Down
2 changes: 1 addition & 1 deletion src/Sylius/Bundle/AdminBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"symfony/framework-bundle": "^3.4"
},
"require-dev": {
"phpunit/phpunit": "^5.6",
"phpunit/phpunit": "^6.5",
"phpspec/phpspec": "^4.0",
"symfony/dependency-injection": "^3.4"
},
Expand Down
4 changes: 2 additions & 2 deletions src/Sylius/Bundle/AttributeBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"require-dev": {
"doctrine/orm": "^2.5",
"phpspec/phpspec": "^4.0",
"phpunit/phpunit": "^5.6",
"phpunit/phpunit": "^6.5",
"symfony/dependency-injection": "^3.4",
"symfony/form": "^3.4",
"symfony/browser-kit": "^3.4",
"incenteev/composer-parameter-handler": "~2.0",
"incenteev/composer-parameter-handler": "^2.0",
"polishsymfonycommunity/symfony-mocker-container": "^1.0"
},
"config": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractCompilerPassTestCase;
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\DefinitionHasMethodCallConstraint;
use PHPUnit\Framework\Constraint\LogicalNot;
use Sylius\Bundle\ChannelBundle\DependencyInjection\Compiler\CompositeChannelContextPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
Expand Down Expand Up @@ -128,7 +129,7 @@ private function assertContainerBuilderNotHasServiceDefinitionWithMethodCall(

self::assertThat(
$definition,
new \PHPUnit_Framework_Constraint_Not(new DefinitionHasMethodCallConstraint($method, $arguments))
new LogicalNot(new DefinitionHasMethodCallConstraint($method, $arguments))
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractCompilerPassTestCase;
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\DefinitionHasMethodCallConstraint;
use PHPUnit\Framework\Constraint\LogicalNot;
use Sylius\Bundle\ChannelBundle\DependencyInjection\Compiler\CompositeRequestResolverPass;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
Expand Down Expand Up @@ -126,7 +127,7 @@ private function assertContainerBuilderNotHasServiceDefinitionWithMethodCall(

self::assertThat(
$definition,
new \PHPUnit_Framework_Constraint_Not(new DefinitionHasMethodCallConstraint($method, $arguments))
new LogicalNot(new DefinitionHasMethodCallConstraint($method, $arguments))
);
}
}
6 changes: 3 additions & 3 deletions src/Sylius/Bundle/ChannelBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@
"symfony/framework-bundle": "^3.4"
},
"require-dev": {
"matthiasnoback/symfony-dependency-injection-test": "^1.0",
"matthiasnoback/symfony-dependency-injection-test": "^2.0",
"phpspec/phpspec": "^4.0",
"phpunit/phpunit": "^5.6",
"phpunit/phpunit": "^6.5",
"twig/twig": "^2.0",
"doctrine/orm": "^2.5",
"symfony/dependency-injection": "^3.4",
"symfony/form": "^3.4",
"symfony/browser-kit": "^3.4",
"incenteev/composer-parameter-handler": "~2.0",
"incenteev/composer-parameter-handler": "^2.0",
"polishsymfonycommunity/symfony-mocker-container": "^1.0"
},
"config": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\AddressFixture;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;

final class AddressFixtureTest extends \PHPUnit_Framework_TestCase
final class AddressFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\AdminUserFixture;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;

final class AdminUserFixtureTest extends \PHPUnit_Framework_TestCase
final class AdminUserFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\ChannelFixture;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;

final class ChannelFixtureTest extends \PHPUnit_Framework_TestCase
final class ChannelFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\CurrencyFixture;
use Sylius\Component\Resource\Factory\FactoryInterface;

final class CurrencyFixtureTest extends \PHPUnit_Framework_TestCase
final class CurrencyFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\CustomerGroupFixture;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;

final class CustomerGroupFixtureTest extends \PHPUnit_Framework_TestCase
final class CustomerGroupFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\GeographicalFixture;
use Sylius\Component\Addressing\Factory\ZoneFactoryInterface;
use Sylius\Component\Resource\Factory\FactoryInterface;
use Symfony\Component\Intl\Intl;

final class GeographicalFixtureTest extends \PHPUnit_Framework_TestCase
final class GeographicalFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\LocaleFixture;
use Sylius\Component\Resource\Factory\FactoryInterface;

final class LocaleFixtureTest extends \PHPUnit_Framework_TestCase
final class LocaleFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\PaymentMethodFixture;

final class PaymentMethodFixtureTest extends \PHPUnit_Framework_TestCase
final class PaymentMethodFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\ProductAssociationFixture;

final class ProductAssociationFixtureTest extends \PHPUnit_Framework_TestCase
final class ProductAssociationFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\ProductAssociationTypeFixture;

final class ProductAssociationTypeFixtureTest extends \PHPUnit_Framework_TestCase
final class ProductAssociationTypeFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\ProductAttributeFixture;

final class ProductAttributeFixtureTest extends \PHPUnit_Framework_TestCase
final class ProductAttributeFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\ProductFixture;

final class ProductFixtureTest extends \PHPUnit_Framework_TestCase
final class ProductFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\ProductOptionFixture;

final class ProductOptionFixtureTest extends \PHPUnit_Framework_TestCase
final class ProductOptionFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\ProductReviewFixture;

final class ProductReviewFixtureTest extends \PHPUnit_Framework_TestCase
final class ProductReviewFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\PromotionFixture;

final class PromotionFixtureTest extends \PHPUnit_Framework_TestCase
final class PromotionFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\ShippingCategoryFixture;

final class ShippingCategoryFixtureTest extends \PHPUnit_Framework_TestCase
final class ShippingCategoryFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\ShippingMethodFixture;

final class ShippingMethodFixtureTest extends \PHPUnit_Framework_TestCase
final class ShippingMethodFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\ShopUserFixture;

final class ShopUserFixtureTest extends \PHPUnit_Framework_TestCase
final class ShopUserFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@

use Doctrine\Common\Persistence\ObjectManager;
use Matthias\SymfonyConfigTest\PhpUnit\ConfigurationTestCaseTrait;
use PHPUnit\Framework\TestCase;
use Sylius\Bundle\CoreBundle\Fixture\Factory\ExampleFactoryInterface;
use Sylius\Bundle\CoreBundle\Fixture\TaxCategoryFixture;

final class TaxCategoryFixtureTest extends \PHPUnit_Framework_TestCase
final class TaxCategoryFixtureTest extends TestCase
{
use ConfigurationTestCaseTrait;

Expand Down

0 comments on commit f97e88e

Please sign in to comment.