Skip to content

Commit

Permalink
Rename namespace for app tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed Aug 7, 2023
1 parent 3407507 commit d64115d
Show file tree
Hide file tree
Showing 64 changed files with 83 additions and 85 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
},
"autoload-dev": {
"psr-4": {
"App\\": "tests/Application/src"
"Tests\\Webgriffe\\SyliusActiveCampaignPlugin\\App\\": "tests/Application/src"
},
"classmap": [
"tests/Application/Kernel.php"
Expand Down
2 changes: 1 addition & 1 deletion spec/Enqueuer/ConnectionEnqueuerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\Enqueuer;

use App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use Doctrine\ORM\EntityManagerInterface;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand Down
2 changes: 1 addition & 1 deletion spec/Enqueuer/ContactEnqueuerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\Enqueuer;

use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use Doctrine\ORM\EntityManagerInterface;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand Down
4 changes: 2 additions & 2 deletions spec/Enqueuer/EcommerceCustomerEnqueuerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\Enqueuer;

use App\Entity\Channel\ChannelInterface;
use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use Doctrine\ORM\EntityManagerInterface;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand Down
4 changes: 2 additions & 2 deletions spec/Enqueuer/EcommerceOrderEnqueuerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\Enqueuer;

use App\Entity\Channel\ChannelInterface;
use App\Entity\Order\OrderInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Order\OrderInterface;
use Doctrine\ORM\EntityManagerInterface;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
Expand Down
2 changes: 1 addition & 1 deletion spec/Enqueuer/WebhookEnqueuerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\Enqueuer;

use App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use Prophecy\Argument;
use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\MessageBusInterface;
Expand Down
2 changes: 1 addition & 1 deletion spec/Mapper/EcommerceCustomerMapperSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\Mapper;

use App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use PhpSpec\ObjectBehavior;
use Sylius\Component\Core\Model\CustomerInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Exception\ChannelConnectionNotSetException;
Expand Down
4 changes: 2 additions & 2 deletions spec/Mapper/EcommerceOrderMapperSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\Mapper;

use App\Entity\Channel\ChannelInterface;
use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use DateTime;
use DateTimeInterface;
use Doctrine\Common\Collections\ArrayCollection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\MessageHandler\Connection;

use App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use InvalidArgumentException;
use PhpSpec\ObjectBehavior;
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\MessageHandler\Connection;

use App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use InvalidArgumentException;
use PhpSpec\ObjectBehavior;
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
Expand Down
2 changes: 1 addition & 1 deletion spec/MessageHandler/Contact/ContactCreateHandlerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\MessageHandler\Contact;

use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use InvalidArgumentException;
use PhpSpec\ObjectBehavior;
use Sylius\Component\Core\Model\CustomerInterface as SyliusCustomerInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\MessageHandler\Contact;

use App\Entity\Channel\ChannelInterface;
use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use InvalidArgumentException;
use Psr\Log\LoggerInterface;
use Sylius\Component\Core\Model\ChannelInterface as SyliusChannelInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\MessageHandler\Contact;

use App\Entity\Channel\ChannelInterface;
use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use InvalidArgumentException;
use LogicException;
use PhpSpec\ObjectBehavior;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\MessageHandler\Contact;

use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use InvalidArgumentException;
use Psr\Log\LoggerInterface;
use Sylius\Component\Core\Model\CustomerInterface as SyliusCustomerInterface;
Expand Down
2 changes: 1 addition & 1 deletion spec/MessageHandler/Contact/ContactUpdateHandlerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\MessageHandler\Contact;

use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use InvalidArgumentException;
use PhpSpec\ObjectBehavior;
use Sylius\Component\Core\Model\CustomerInterface as SyliusCustomerInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\MessageHandler\EcommerceCustomer;

use App\Entity\Channel\ChannelInterface;
use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use Doctrine\ORM\EntityManagerInterface;
use InvalidArgumentException;
use PhpSpec\ObjectBehavior;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\MessageHandler\EcommerceCustomer;

use App\Entity\Channel\ChannelInterface;
use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use InvalidArgumentException;
use PhpSpec\ObjectBehavior;
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\MessageHandler\EcommerceOrder;

use App\Entity\Order\OrderInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Order\OrderInterface;
use InvalidArgumentException;
use PhpSpec\ObjectBehavior;
use Sylius\Component\Core\Model\OrderInterface as SyliusOrderInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\MessageHandler\EcommerceOrder;

use App\Entity\Order\OrderInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Order\OrderInterface;
use InvalidArgumentException;
use PhpSpec\ObjectBehavior;
use Sylius\Component\Core\Model\OrderInterface as SyliusOrderInterface;
Expand Down
2 changes: 1 addition & 1 deletion spec/MessageHandler/Webhook/WebhookCreateHandlerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\MessageHandler\Webhook;

use App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use InvalidArgumentException;
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
use Sylius\Component\Core\Model\ChannelInterface as SyliusChannelInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\Resolver;

use App\Entity\Channel\ChannelInterface;
use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Exception\ChannelCustomerDoesNotExistException;
use Webgriffe\SyliusActiveCampaignPlugin\Exception\ChannelListIdDoesNotExistException;
use Webgriffe\SyliusActiveCampaignPlugin\Exception\CustomerListSubscriptionStatusNotDefinedException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\Resolver;

use App\Entity\Channel\ChannelInterface;
use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\ChannelInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Exception\ChannelListIdDoesNotExistException;
use Webgriffe\SyliusActiveCampaignPlugin\Model\ActiveCampaign\ContactListInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Model\ChannelCustomerInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\Updater;

use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use InvalidArgumentException;
use Sylius\Component\Core\Model\ChannelInterface;
use Sylius\Component\Core\Model\CustomerInterface as SyliusCustomerInterface;
use Sylius\Component\Resource\Repository\RepositoryInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Model\ActiveCampaign\ContactListInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Model\ChannelCustomerInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Resolver\ListSubscriptionStatusResolverInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Updater\ChannelCustomerBasedListSubscriptionStatusUpdater;
use PhpSpec\ObjectBehavior;
use Webgriffe\SyliusActiveCampaignPlugin\Updater\ListSubscriptionStatusUpdaterInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@

namespace spec\Webgriffe\SyliusActiveCampaignPlugin\Updater;

use App\Entity\Customer\CustomerInterface;
use Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\CustomerInterface;
use Sylius\Component\Core\Model\ChannelInterface;
use Sylius\Component\Core\Repository\CustomerRepositoryInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Model\ActiveCampaign\ContactListInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Resolver\ListSubscriptionStatusResolverInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Updater\CustomerBasedListSubscriptionStatusUpdater;
use PhpSpec\ObjectBehavior;
use Webgriffe\SyliusActiveCampaignPlugin\Updater\ListSubscriptionStatusUpdaterInterface;
Expand Down
12 changes: 6 additions & 6 deletions tests/Application/config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ sylius_channel:
resources:
channel:
classes:
model: App\Entity\Channel\Channel
repository: App\Doctrine\ORM\ChannelRepository
model: Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\Channel
repository: Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Doctrine\ORM\ChannelRepository

sylius_customer:
resources:
customer:
classes:
model: App\Entity\Customer\Customer
repository: App\Doctrine\ORM\CustomerRepository
model: Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\Customer
repository: Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Doctrine\ORM\CustomerRepository

sylius_order:
resources:
order:
classes:
model: App\Entity\Order\Order
repository: App\Doctrine\ORM\OrderRepository
model: Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Order\Order
repository: Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Doctrine\ORM\OrderRepository
6 changes: 3 additions & 3 deletions tests/Application/config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ doctrine:
default:
auto_mapping: true
mappings:
App:
Tests\Webgriffe\SyliusActiveCampaignPlugin\App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
prefix: 'Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity'
alias: Tests\Webgriffe\SyliusActiveCampaignPlugin\App
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ webgriffe_sylius_active_campaign:
resources:
channel_customer:
classes:
model: App\Entity\Customer\ChannelCustomer
model: Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer\ChannelCustomer
2 changes: 1 addition & 1 deletion tests/Application/src/Doctrine/ORM/ChannelRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Doctrine\ORM;
namespace Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Doctrine\ORM;

use Sylius\Bundle\ChannelBundle\Doctrine\ORM\ChannelRepository as BaseChannelRepository;
use Webgriffe\SyliusActiveCampaignPlugin\Doctrine\ORM\ActiveCampaignChannelRepositoryTrait;
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/src/Doctrine/ORM/CustomerRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Doctrine\ORM;
namespace Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Doctrine\ORM;

use Sylius\Bundle\CoreBundle\Doctrine\ORM\CustomerRepository as BaseCustomerRepository;
use Webgriffe\SyliusActiveCampaignPlugin\Doctrine\ORM\ActiveCampaignCustomerRepositoryTrait;
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/src/Doctrine/ORM/OrderRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Doctrine\ORM;
namespace Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Doctrine\ORM;

use Sylius\Bundle\CoreBundle\Doctrine\ORM\OrderRepository as BaseOrderRepository;
use Webgriffe\SyliusActiveCampaignPlugin\Doctrine\ORM\ActiveCampaignOrderRepositoryTrait;
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/src/Entity/Channel/Channel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Entity\Channel;
namespace Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel;

use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\Channel as BaseChannel;
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/src/Entity/Channel/ChannelInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Entity\Channel;
namespace Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel;

use Sylius\Component\Core\Model\ChannelInterface as BaseChannelInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Model\ChannelActiveCampaignAwareInterface;
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/src/Entity/Customer/ChannelCustomer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Entity\Customer;
namespace Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer;

use Doctrine\ORM\Mapping as ORM;
use Webgriffe\SyliusActiveCampaignPlugin\Model\ChannelCustomer as BaseChannelCustomer;
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/src/Entity/Customer/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Entity\Customer;
namespace Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer;

use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\Customer as BaseCustomer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Entity\Customer;
namespace Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Customer;

use Sylius\Component\Core\Model\CustomerInterface as BaseCustomerInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Model\CustomerActiveCampaignAwareInterface;
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/src/Entity/Order/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Entity\Order;
namespace Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Order;

use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\Order as BaseOrder;
Expand Down
2 changes: 1 addition & 1 deletion tests/Application/src/Entity/Order/OrderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace App\Entity\Order;
namespace Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Order;

use Sylius\Component\Core\Model\OrderInterface as BaseOrderInterface;
use Webgriffe\SyliusActiveCampaignPlugin\Model\ActiveCampaignAwareInterface;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
App\Entity\Channel\Channel:
Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\Channel:
fashion_shop:
code: "fashion_shop"
name: "Fashion shop"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
App\Entity\Channel\Channel:
Tests\Webgriffe\SyliusActiveCampaignPlugin\App\Entity\Channel\Channel:
fashion_shop:
code: "fashion_shop"
name: "Fashion shop"
Expand Down
Loading

0 comments on commit d64115d

Please sign in to comment.