Skip to content

Commit

Permalink
Change tests namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Mar 11, 2024
1 parent c28952d commit 728e479
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 20 deletions.
22 changes: 20 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,27 @@
"webmozart/assert": "^1.11"
},
"require-dev": {
"api-platform/core": "^2.7.16",
"babdev/pagerfanta-bundle": "^3.8",
"behat/behat": "^3.14",
"doctrine/doctrine-bundle": "^2.0",
"infection/infection": "^0.27.9",
"jms/serializer-bundle": "^4.2",
"lexik/jwt-authentication-bundle": "^2.17",
"matthiasnoback/symfony-config-test": "^4.3 || ^5.1",
"matthiasnoback/symfony-dependency-injection-test": "^4.3 || ^5.0",
"phpunit/phpunit": "^9.6",
"psalm/plugin-phpunit": "^0.18",
"setono/code-quality-pack": "^2.7",
"sylius/sylius": "~1.11.15",
"psalm/plugin-phpunit": "^0.18.4"
"symfony/debug-bundle": "^5.4 || ^6.4 || ^7.0",
"symfony/dotenv": "^5.4 || ^6.4 || ^7.0",
"symfony/intl": "^5.4 || ^6.4 || ^7.0",
"symfony/property-info": "^5.4 || ^6.4 || ^7.0",
"symfony/serializer": "^5.4 || ^6.4 || ^7.0",
"symfony/web-profiler-bundle": "^5.4 || ^6.4 || ^7.0",
"symfony/webpack-encore-bundle": "^1.17",
"willdurand/negotiation": "^3.1"
},
"prefer-stable": true,
"autoload": {
Expand All @@ -37,7 +55,7 @@
},
"autoload-dev": {
"psr-4": {
"Tests\\Loevgaard\\SyliusBrandPlugin\\": "tests/"
"Loevgaard\\SyliusBrandPlugin\\Tests\\": "tests/"
},
"classmap": [
"tests/Application/Kernel.php"
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<server name="IS_DOCTRINE_ORM_SUPPORTED" value="true" />
<server name="ESCAPE_JSON" value="true" />

<server name="KERNEL_CLASS" value="Tests\Loevgaard\SyliusBrandPlugin\Application\Kernel" />
<server name="KERNEL_CLASS" value="Loevgaard\SyliusBrandPlugin\Tests\Application\Kernel" />
<server name="EXPECTED_RESPONSE_DIR" value="../Responses/Expected" />
<server name="FIXTURES_DIR" value="../DataFixtures/ORM" />
</php>
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/Doctrine/ORM/ProductRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Loevgaard\SyliusBrandPlugin\Application\Doctrine\ORM;
namespace Loevgaard\SyliusBrandPlugin\Tests\Application\Doctrine\ORM;

use Loevgaard\SyliusBrandPlugin\Doctrine\ORM\ProductRepositoryInterface;
use Loevgaard\SyliusBrandPlugin\Doctrine\ORM\ProductRepositoryTrait;
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Loevgaard\SyliusBrandPlugin\Application;
namespace Loevgaard\SyliusBrandPlugin\Tests\Application;

use PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/Menu/AdminBrandFormMenuListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Loevgaard\SyliusBrandPlugin\Application\Menu;
namespace Loevgaard\SyliusBrandPlugin\Tests\Application\Menu;

use Loevgaard\SyliusBrandPlugin\Event\BrandMenuBuilderEvent;

Expand Down
2 changes: 1 addition & 1 deletion tests/Application/Model/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Loevgaard\SyliusBrandPlugin\Application\Model;
namespace Loevgaard\SyliusBrandPlugin\Tests\Application\Model;

use Doctrine\ORM\Mapping as ORM;
use Loevgaard\SyliusBrandPlugin\Model\ProductInterface as LoevgaardSyliusBrandPluginProductInterface;
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
use Tests\Loevgaard\SyliusBrandPlugin\Application\Kernel;
use Loevgaard\SyliusBrandPlugin\Tests\Application\Kernel;

set_time_limit(0);

Expand Down
2 changes: 1 addition & 1 deletion tests/Application/config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ doctrine:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/Model'
prefix: 'Tests\Loevgaard\SyliusBrandPlugin\Application\Model'
prefix: 'Loevgaard\SyliusBrandPlugin\Tests\Application\Model'
alias: App
6 changes: 3 additions & 3 deletions tests/Application/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ sylius_product:
resources:
product:
classes:
model: Tests\Loevgaard\SyliusBrandPlugin\Application\Model\Product
repository: Tests\Loevgaard\SyliusBrandPlugin\Application\Doctrine\ORM\ProductRepository
model: Loevgaard\SyliusBrandPlugin\Tests\Application\Model\Product
repository: Loevgaard\SyliusBrandPlugin\Tests\Application\Doctrine\ORM\ProductRepository

services:
app.listener.admin.brand_form_menu_builder:
class: Tests\Loevgaard\SyliusBrandPlugin\Application\Menu\AdminBrandFormMenuListener
class: Loevgaard\SyliusBrandPlugin\Tests\Application\Menu\AdminBrandFormMenuListener
tags:
- name: kernel.event_listener
event: loevgaard_sylius_brand.menu.admin.brand.form
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Symfony\Component\Debug\Debug;
use Symfony\Component\HttpFoundation\Request;
use Tests\Loevgaard\SyliusBrandPlugin\Application\Kernel;
use Loevgaard\SyliusBrandPlugin\Tests\Application\Kernel;

require __DIR__ . '/../../../vendor/autoload.php';

Expand Down
2 changes: 1 addition & 1 deletion tests/Controller/AbstractApiTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Loevgaard\SyliusBrandPlugin\Controller;
namespace Loevgaard\SyliusBrandPlugin\Tests\Controller;

use ApiTestCase\JsonApiTestCase;
use ApiTestCase\PathBuilder;
Expand Down
2 changes: 1 addition & 1 deletion tests/Controller/BrandApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Loevgaard\SyliusBrandPlugin\Controller;
namespace Loevgaard\SyliusBrandPlugin\Tests\Controller;

use Loevgaard\SyliusBrandPlugin\Model\BrandInterface;
use Symfony\Component\HttpFoundation\File\UploadedFile;
Expand Down
2 changes: 1 addition & 1 deletion tests/Controller/BrandImageApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Loevgaard\SyliusBrandPlugin\Controller;
namespace Loevgaard\SyliusBrandPlugin\Tests\Controller;

use Loevgaard\SyliusBrandPlugin\Model\BrandImageInterface;
use Loevgaard\SyliusBrandPlugin\Model\BrandInterface;
Expand Down
2 changes: 1 addition & 1 deletion tests/Controller/ProductApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Loevgaard\SyliusBrandPlugin\Controller;
namespace Loevgaard\SyliusBrandPlugin\Tests\Controller;

use Loevgaard\SyliusBrandPlugin\Model\BrandInterface;
use Loevgaard\SyliusBrandPlugin\Model\ProductInterface;
Expand Down
2 changes: 1 addition & 1 deletion tests/DataFixtures/ORM/resources/products.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Sylius\Component\Core\Model\ProductTranslation:
description: <paragraph(2)>
translatable: "@product_setono_sticker"

Tests\Loevgaard\SyliusBrandPlugin\Application\Model\Product:
Loevgaard\SyliusBrandPlugin\Tests\Application\Model\Product:
product_setono_mug:
brand: "@brand_setono"
fallbackLocale: "en_US"
Expand Down
2 changes: 1 addition & 1 deletion tests/Fixture/BrandFixtureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Loevgaard\SyliusBrandPlugin\Fixture;
namespace Loevgaard\SyliusBrandPlugin\Tests\Fixture;

use Doctrine\Common\Persistence\ObjectManager;
use Loevgaard\SyliusBrandPlugin\Fixture\BrandFixture;
Expand Down
2 changes: 1 addition & 1 deletion tests/Model/BrandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Tests\Loevgaard\SyliusBrandPlugin\Model;
namespace Loevgaard\SyliusBrandPlugin\Tests\Model;

use Doctrine\Common\Collections\ArrayCollection;
use Loevgaard\SyliusBrandPlugin\Model\Brand;
Expand Down

0 comments on commit 728e479

Please sign in to comment.