<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:monolog="http://symfony.com/schema/dic/monolog"
           xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd">

    <monolog:config>
        <monolog:handler
                id="Monolog\Handler\NullHandler"
                name="business_event_handler_discard"
                type="service"
                priority="1">
            <monolog:channels>
                <monolog:channel>business_events</monolog:channel>
            </monolog:channels>
        </monolog:handler>
    </monolog:config>

    <services>
        <defaults public="true"/>

        <service id="Shopware\Core\Test\Integration\PaymentHandler\AsyncTestPaymentHandler">
            <argument type="service" id="Shopware\Core\Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler"/>
            <tag name="shopware.payment.method.async"/>
        </service>

        <service id="Shopware\Core\Test\Integration\PaymentHandler\PreparedTestPaymentHandler">
            <tag name="shopware.payment.method.prepared"/>
        </service>

        <service id="Shopware\Core\Test\Integration\PaymentHandler\MultipleTestPaymentHandler">
            <tag name="shopware.payment.method.sync"/>
            <tag name="shopware.payment.method.prepared"/>
        </service>

        <service id="Shopware\Core\Test\Integration\PaymentHandler\RefundTestPaymentHandler">
            <argument type="service" id="Shopware\Core\Checkout\Order\Aggregate\OrderTransactionCaptureRefund\OrderTransactionCaptureRefundStateHandler"/>
            <tag name="shopware.payment.method.refund"/>
        </service>

        <service id="Shopware\Core\Test\Integration\PaymentHandler\SyncTestFailedPaymentHandler">
            <tag name="shopware.payment.method.sync"/>
        </service>

        <service id="Shopware\Core\Test\Integration\PaymentHandler\SyncTestPaymentHandler">
            <argument type="service" id="Shopware\Core\Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler"/>
            <tag name="shopware.payment.method.sync"/>
        </service>

        <service id="Shopware\Core\Framework\Test\Filesystem\Adapter\MemoryAdapterFactory">
            <tag name="shopware.filesystem.factory"/>
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\NamedDefinition">
            <tag name="shopware.entity.definition"/>
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\NamedOptionalGroupDefinition">
            <tag name="shopware.entity.definition"/>
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\RootDefinition">
            <tag name="shopware.entity.definition" entity="root" />
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\SubDefinition">
            <tag name="shopware.entity.definition" entity="root_sub" />
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\SubCascadeDefinition">
            <tag name="shopware.entity.definition" entity="root_sub_cascade" />
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\SubManyDefinition">
            <tag name="shopware.entity.definition" entity="root_sub_many" />
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Write\Validation\TestDefinition\TestDefinition">
            <tag name="shopware.entity.definition" entity="_test_lock" />
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Write\Validation\TestDefinition\TestTranslationDefinition">
            <tag name="shopware.entity.definition" entity="_test_lock_translation" />
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\CustomFieldTestDefinition">
            <tag name="shopware.entity.definition" entity="attribute_test" />
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\CustomFieldTestTranslationDefinition">
            <tag name="shopware.entity.definition" entity="attribute_test_translation" />
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\WriteProtectedDefinition">
            <tag name="shopware.entity.definition" entity="_test_nullable" />
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\WriteProtectedRelationDefinition">
            <tag name="shopware.entity.definition" entity="_test_relation" />
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\WriteProtectedReferenceDefinition">
            <tag name="shopware.entity.definition" entity="_test_nullable_reference" />
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\ExtendedProductDefinition">
            <tag name="shopware.entity.definition" entity="extended_product" />
        </service>

        <service id="Shopware\Core\Framework\Test\DataAbstractionLayer\Field\TestDefinition\DateTimeDefinition">
            <tag name="shopware.entity.definition" entity="date_time_test" />
        </service>

        <service id="messenger.test_receiver_locator" alias="messenger.receiver_locator" public="true"/>
        <service id="messenger.bus.test_shopware" class="Symfony\Component\Messenger\TraceableMessageBus" decorates="messenger.bus.shopware">
            <argument type="service" id=".inner"/>
        </service>

        <service id="mailer.mailer" class="Symfony\Component\Mailer\Mailer">
            <argument type="service" id="mailer.transports" />
            <argument type="service" id="messenger.default_bus" />
            <argument type="service" id="debug.event_dispatcher" on-invalid="ignore" />
        </service>

        <service id="test.browser" alias="test.client" />

        <service id="test.client" class="Shopware\Core\Framework\Test\TestCaseHelper\TestBrowser" shared="false" public="true">
            <argument type="service" id="kernel" />
            <argument>%test.client.parameters%</argument>
            <argument type="service" id="test.client.history" />
            <argument type="service" id="test.client.cookiejar" />
        </service>

        <service id="Monolog\Handler\NullHandler"/>

        <service id="Shopware\Core\Framework\Test\MessageQueue\fixtures\TestMessageHandler">
            <tag name="messenger.message_handler"/>
        </service>

        <service id="Shopware\Core\Content\Test\Category\Service\CountingEntityReader" decorates="Shopware\Core\Framework\DataAbstractionLayer\Read\EntityReaderInterface">
            <argument type="service" id="Shopware\Core\Content\Test\Category\Service\CountingEntityReader.inner"/>
        </service>

        <service id="Shopware\Core\Content\Test\Category\Service\CountingEntitySearcher" decorates="Shopware\Core\Framework\DataAbstractionLayer\Search\EntitySearcherInterface">
            <argument type="service" id="Shopware\Core\Content\Test\Category\Service\CountingEntitySearcher.inner"/>
        </service>

        <service id="Shopware\Core\Framework\Test\TestCacheClearer">
            <argument type="collection">
                <argument type="service" id="cache.object" />
                <argument type="service" id="cache.http" />
            </argument>
            <argument type="service" id="cache_clearer"/>
            <argument>%kernel.cache_dir%</argument>
        </service>

        <service id="shopware.app_system.guzzle" class="GuzzleHttp\Client">
            <argument type="collection">
                <argument key="handler" type="service">
                    <service class="GuzzleHttp\HandlerStack">
                        <factory class="GuzzleHttp\HandlerStack" method="create" />
                        <argument type="service" id="Shopware\Core\Test\Integration\App\TestAppServer"/>
                        <call method="push">
                            <argument type="service" id="shopware.app_system.guzzle.middleware"/>
                        </call>
                        <call method="push">
                            <argument type="service" id="test.guzzle.history.middleware"/>
                        </call>
                    </service>
                </argument>
            </argument>
        </service>

        <service id="Shopware\Core\Test\Integration\App\TestAppServer">
            <argument type="service" id="GuzzleHttp\Handler\MockHandler"/>
        </service>

        <service id="GuzzleHttp\Handler\MockHandler" public="true">
            <argument type="collection">
            </argument>
        </service>

        <service id="test.guzzle.history.middleware" class="callable">
            <factory service="Shopware\Core\Test\Integration\App\GuzzleHistoryCollector" method="getHistoryMiddleWare"/>
        </service>

        <service id="Shopware\Core\Test\Integration\App\GuzzleHistoryCollector" public="true" />

        <service id="Shopware\Core\Framework\Test\Api\Acl\fixtures\AclTestController" public="true"/>

        <service id="test_payment_decoration" class="Shopware\Core\Framework\App\Payment\Handler\AppAsyncPaymentHandler" decorates="Shopware\Core\Framework\App\Payment\Handler\AppAsyncPaymentHandler">
            <argument type="service" id="Shopware\Core\Checkout\Order\Aggregate\OrderTransaction\OrderTransactionStateHandler"/>
            <argument type="service" id="Shopware\Core\System\StateMachine\StateMachineRegistry"/>
            <argument type="service" id="Shopware\Core\Framework\App\Payment\Payload\PaymentPayloadService"/>
            <argument type="service" id="order_transaction_capture_refund.repository"/>
        </service>

        <service id="Shopware\Core\Framework\Test\TestSessionStorageFactory" decorates="session.storage.factory.mock_file"/>
    </services>

</container>
