From 80c236137fe990d0563ff822c01f6301e14c4c4b Mon Sep 17 00:00:00 2001 From: GitHub Actions Bot <> Date: Fri, 29 Mar 2024 09:06:56 +0000 Subject: [PATCH] chore: Build release --- .github/workflows/build.yml | 15 -- .github/workflows/unit.yml | 40 ---- .gitignore | 7 - .gitpod.Dockerfile | 5 - .gitpod.yml | 91 --------- .shopware-extension.yml | 14 -- composer.lock | 72 +++++++ .../css/frosh-platform-template-mail.css | 1 + .../js/frosh-platform-template-mail.js | 127 ++++++++++++ src/Resources/store/de.md | 20 -- src/Resources/store/en.md | 19 -- src/Resources/store/icon.png | Bin 10151 -> 0 bytes src/Resources/store/images/1.png | Bin 26472 -> 0 bytes tests/Command/ExportCommandTest.php | 45 ---- .../CacheCompilerPassTest.php | 42 ---- tests/Extension/MailTemplateExtensionTest.php | 40 ---- tests/Integration/OrderTest.php | 192 ------------------ .../SetupExampleTemplatesTrait.php | 51 ----- .../CachedMailFinderServiceTest.php | 31 --- tests/Services/MailLoader/InkyLoaderTest.php | 24 --- tests/Services/MailLoader/MjmlLoaderTest.php | 57 ------ tests/Services/MailLoader/TwigLoaderTest.php | 19 -- tests/Services/MailLoader/_fixtures/test.inky | 5 - tests/Services/MailLoader/_fixtures/test.mjml | 11 - tests/Services/SearchPathProviderTest.php | 83 -------- tests/Services/StringTemplateRendererTest.php | 29 --- tests/TestBootstrap.php | 52 ----- 27 files changed, 200 insertions(+), 892 deletions(-) delete mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/unit.yml delete mode 100644 .gitignore delete mode 100644 .gitpod.Dockerfile delete mode 100644 .gitpod.yml delete mode 100644 .shopware-extension.yml create mode 100644 composer.lock create mode 100644 src/Resources/public/administration/css/frosh-platform-template-mail.css create mode 100644 src/Resources/public/administration/js/frosh-platform-template-mail.js delete mode 100644 src/Resources/store/de.md delete mode 100644 src/Resources/store/en.md delete mode 100644 src/Resources/store/icon.png delete mode 100644 src/Resources/store/images/1.png delete mode 100644 tests/Command/ExportCommandTest.php delete mode 100644 tests/DependencyInjection/CacheCompilerPassTest.php delete mode 100644 tests/Extension/MailTemplateExtensionTest.php delete mode 100644 tests/Integration/OrderTest.php delete mode 100644 tests/Integration/SetupExampleTemplatesTrait.php delete mode 100644 tests/Services/MailLoader/CachedMailFinderServiceTest.php delete mode 100644 tests/Services/MailLoader/InkyLoaderTest.php delete mode 100644 tests/Services/MailLoader/MjmlLoaderTest.php delete mode 100644 tests/Services/MailLoader/TwigLoaderTest.php delete mode 100644 tests/Services/MailLoader/_fixtures/test.inky delete mode 100644 tests/Services/MailLoader/_fixtures/test.mjml delete mode 100644 tests/Services/SearchPathProviderTest.php delete mode 100644 tests/Services/StringTemplateRendererTest.php delete mode 100644 tests/TestBootstrap.php diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index f098d76..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Build extension -on: - push: - branches: - - '1.x' - -jobs: - build: - uses: FriendsOfShopware/actions/.github/workflows/store-shopware-cli.yml@main - with: - extensionName: ${{ github.event.repository.name }} - secrets: - accountUser: ${{ secrets.ACCOUNT_USER }} - accountPassword: ${{ secrets.ACCOUNT_PASSWORD }} - ghToken: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml deleted file mode 100644 index 70fa771..0000000 --- a/.github/workflows/unit.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: PHPUnit -on: - push: - branches: - - '1.x' - tags-ignore: - - '*' - pull_request: - -env: - PLUGIN_NAME: FroshPlatformTemplateMail - -jobs: - phpunit: - name: Run tests - container: ghcr.io/friendsofshopware/platform-plugin-dev:v6.4.17 - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: ${{ env.PLUGIN_NAME }} - - - name: Run Tests - run: | - cp -r "./${PLUGIN_NAME}" "/plugins/${PLUGIN_NAME}" - shopware-cli extension prepare "/plugins/${PLUGIN_NAME}" - start-mysql - export PROJECT_ROOT=/opt/shopware - /opt/shopware/bin/console plugin:refresh - /opt/shopware/bin/console plugin:install --activate -c ${PLUGIN_NAME} - cd /opt/shopware/custom/plugins/${PLUGIN_NAME} - php -d pcov.enabled=1 /opt/shopware/vendor/bin/phpunit --coverage-clover clover.xml - - - uses: codecov/codecov-action@v1 - with: - file: ./clover.xml - root_dir: /plugins/FroshPlatformTemplateMail - working-directory: /plugins/FroshPlatformTemplateMail - diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 9ad6d93..0000000 --- a/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -.idea -*.phar -/.phpunit.result.cache -/composer.lock -/vendor -src/Resources/views/ -src/Resources/public/ diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile deleted file mode 100644 index 4b009a6..0000000 --- a/.gitpod.Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM gitpod/workspace-full:latest - -RUN sudo apt-get update && \ - sudo apt-get install -y php8.1-fpm rsync && \ - brew install symfony-cli/tap/symfony-cli FriendsOfShopware/tap/shopware-cli \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index 16e53b4..0000000 --- a/.gitpod.yml +++ /dev/null @@ -1,91 +0,0 @@ -image: - file: .gitpod.Dockerfile - -tasks: - - name: Shopware - before: | - echo 'alias admin-watch="LOAD_DOTENV=0 APP_URL=http://localhost:8000 ./bin/watch-administration.sh"' >> ~/.bashrc - init: | - EXTENSION_NAME=$(basename $PWD) - TMP_DIR=$(mktemp -d) - - mv * .* "$TMP_DIR" || true - - # Run MySQL - docker run --restart always -d --name=mysql -p 127.0.0.1:3306:3306 -e MYSQL_ROOT_PASSWORD=root mysql:8 - docker run --restart always -d --name=adminer --link mysql:mysql -p 5000:8080 -e ADMINER_DESIGN=pepa-linha -e ADMINER_DEFAULT_SERVER=mysql -e ADMINER_PLUGINS="tables-filter table-structure json-column version-noverify" ghcr.io/shyim/shopware-docker/adminer - - # Configure Github Token. Needed for Symfony Flex - sudo chown -R gitpod:gitpod /home/gitpod/.config/composer - composer config --global github-oauth.github.com $(printf '%s\n' host=github.com | gp credential-helper get | sort | head -2 | tail -1 | sed 's;password=;;') - - composer create-project shopware/production:dev-flex . -n - composer req --dev profiler fakerphp/faker mbezhanov/faker-provider-collection maltyxx/images-generator - - # PHP Settings - echo "memory_limit=512M" > php.ini - echo "assert.active=0" >> php.ini - echo "opcache.interned_strings_buffer=20" >> php.ini - echo "zend.detect_unicode=0" >> php.ini - echo "realpath_cache_ttl=3600" >> php.ini - # Configure Shopware - sed -i -e 's;DATABASE_URL=.*$;DATABASE_URL=mysql://root:root@127.0.0.1:3306/shopware;' .env - sed -i -e "s;APP_URL=.*$;APP_URL=$(gp url 8000);" .env - echo "TRUSTED_PROXIES=192.168.0.0/16" >> .env - - ./bin/console system:install --basic-setup --create-database --drop-database - - ./bin/console framework:demodata --products 300 - ./bin/console dal:refresh:index - rm -rf var/cache/* - # Set by default to dev - sed -i -e "s;APP_ENV=.*$;APP_URL=dev;" .env - - # Move actual repository - mv "$TMP_DIR" "custom/plugins/$EXTENSION_NAME" - command: docker ps && sleep 2 && ./bin/console sales-channel:update:domain $(gp url 8000 | awk -F[/:] '{print $4}') && symfony server:start --port 8000 -d - -ports: - - port: 8000 - visibility: private - description: Shopware - onOpen: open-browser - - port: 5000 - visibility: private - description: Adminer - onOpen: notify - - name: Admin-Watcher - port: 8080 - onOpen: notify - description: "Use Forward Proxy to localhost to access this service" - -jetbrains: - plugins: - - com.jetbrains.php - - com.intellij.php.tools.quality.phpstan - - com.intellij.php.psalm - - org.jetbrains.plugins.yaml - - com.jetbrains.twig - - de.espend.idea.php.annotation - - fr.adrienbrault.idea.symfony2plugin - - de.shyim.shopware6 - - de.shyim.ideaphpstantoolbox - phpstorm: - vmoptions: "-Xmx4g" - prebuilds: - version: stable - -vscode: - extensions: - - bmewburn.vscode-intelephense-client - - redhat.vscode-yaml - -github: - prebuilds: - master: true - branches: true - pullRequests: true - pullRequestsFromForks: true - addCheck: false - addComment: false - addBadge: true diff --git a/.shopware-extension.yml b/.shopware-extension.yml deleted file mode 100644 index 2c25dc9..0000000 --- a/.shopware-extension.yml +++ /dev/null @@ -1,14 +0,0 @@ -build: - zip: - composer: - enabled: true - assets: - enabled: true - enable_es_build_for_admin: true - enable_es_build_for_storefront: true - pack: - excludes: - paths: - - .idea - - var - - .gitignore diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..22c82dc --- /dev/null +++ b/composer.lock @@ -0,0 +1,72 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "bebb4f5075dc028c60e31563328c59cf", + "packages": [ + { + "name": "lorenzo/pinky", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/lorenzo/pinky.git", + "reference": "e1b1bdb2c132b8a7ba32bca64d2443f646ddbd17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lorenzo/pinky/zipball/e1b1bdb2c132b8a7ba32bca64d2443f646ddbd17", + "reference": "e1b1bdb2c132b8a7ba32bca64d2443f646ddbd17", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xsl": "*", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.21 || ^9.5.10" + }, + "type": "library", + "autoload": { + "files": [ + "src/pinky.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jose Lorenzo Rodriguez", + "email": "jose.zap@gmail.com" + } + ], + "description": "A Foundation for Emails (Inky) template transpiler", + "keywords": [ + "email", + "foundation", + "inky", + "template", + "zurb" + ], + "support": { + "issues": "https://github.com/lorenzo/pinky/issues", + "source": "https://github.com/lorenzo/pinky/tree/1.1.0" + }, + "time": "2023-07-31T13:36:50+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.6.0" +} diff --git a/src/Resources/public/administration/css/frosh-platform-template-mail.css b/src/Resources/public/administration/css/frosh-platform-template-mail.css new file mode 100644 index 0000000..1b3fcb0 --- /dev/null +++ b/src/Resources/public/administration/css/frosh-platform-template-mail.css @@ -0,0 +1 @@ +.sw-mail-template-detail__options-info-wrapper .sw-field,.sw-mail-template-detail .sw-code-editor{margin-bottom:5px}.sw-mail-template-detail .sw-code-editor+.sw-label{margin-bottom:32px} diff --git a/src/Resources/public/administration/js/frosh-platform-template-mail.js b/src/Resources/public/administration/js/frosh-platform-template-mail.js new file mode 100644 index 0000000..75f597d --- /dev/null +++ b/src/Resources/public/administration/js/frosh-platform-template-mail.js @@ -0,0 +1,127 @@ +(()=>{var l=`{% block sw_mail_template_list_grid %} + + + + + + +{% endblock %} +`;Shopware.Component.override("sw-mail-template-list",{template:l,methods:{getListColumns(){let e=this.$super("getListColumns");return e.unshift({property:"froshTemplateMail",label:"sw-mail-template.list.columnTemplateMail",allowResize:!0},{property:"technicalName",label:"sw-mail-template.list.columnTechnicalName",allowResize:!0,visible:!1}),e},getFroshTooltip(e,t){return{message:t?this.$t(`sw-mail-template.frosh.${e}`,{folder:t}):this.$t("sw-mail-template.frosh.noTemplate")}}}});var a=`{% block sw_mail_template_options_form_subject_field %} + {% parent %} + + + +{% endblock %} + +{% block sw_mail_template_mail_text_form_content_plain_field %} + {% parent %} + + + +{% endblock %} + +{% block sw_mail_template_mail_text_form_content_html_field %} + {% parent %} + + + +{% endblock %} +`;Shopware.Component.override("sw-mail-template-detail",{template:a,methods:{getFroshTooltip(e,t){return{message:t?this.$t(`sw-mail-template.frosh.${e}`,{folder:t}):this.$t("sw-mail-template.frosh.noTemplate")}}}});})(); diff --git a/src/Resources/store/de.md b/src/Resources/store/de.md deleted file mode 100644 index daf8f9b..0000000 --- a/src/Resources/store/de.md +++ /dev/null @@ -1,20 +0,0 @@ -Mit Template Mail kannst du deine Mail-Templates aus der Administration in dein Theme auslagern. -Somit sind deine Mail-Templates versioniert, können voneinander erben und du profitierst von all den anderen tollen Dingen, die man in Twig machen kann. -Dieses Plugin stellt außerdem einen Loader bereit, der dafür sorgt, dass andere Plugins weitere Dateitypen hinzufügen können. Im Plugin selbst werden aktuell Twig, [MJML](https://mjml.io/) und [Inky](https://foundation.zurb.com/emails/docs/inky.html) unterstützt. - - -## Wie benutze ich das Plugin? -Durch die Installation ändert sich erst mal nichts für dich. Du kannst anfangen die ersten Templates in dein Theme auszulagern. - -### Beispiel Pfade für Twig, Zahlungsbestätigung (*order_transaction.state.paid*): -Ordner: custom/plugins/*MyTheme*/Resources/views/email/global/ - -- HTML-Inhalt der Zahlungsbestätigung: *order_transaction.state.paid*/html.twig -- PlainText-Inhalt der Zahlungsbestätigung: *order_transaction.state.paid*/plain.twig -- Betreff der Zahlungsbestätigung: *order_transaction.state.paid*/subject.twig - - -Das Plugin wird von der Github Organization [FriendsOfShopware](https://github.com/FriendsOfShopware/) entwickelt. -Maintainer des Plugin ist [Soner Sayakci](https://github.com/shyim). -Das Github Repository ist zu finden [hier](https://github.com/FriendsOfShopware/FroshPlatformTemplateMail) -[Bei Fragen / Fehlern bitte ein Github Issue erstellen](https://github.com/FriendsOfShopware/FroshPlatformTemplateMail/issues/new) diff --git a/src/Resources/store/en.md b/src/Resources/store/en.md deleted file mode 100644 index 2dc5b2e..0000000 --- a/src/Resources/store/en.md +++ /dev/null @@ -1,19 +0,0 @@ -With Template Mail you can outsource your mail templates in the administration to your theme. -So your mail templates are versioned, can inherit from each other and all the other great things you can do in Twig. -The plugin also supports loaders. So other plugins can add file extensions where they can create the mail. -The plugin itself supports Twig and MJML by default. - -## How do I use the plugin? - -After installation nothing changes for you. You can now start to swap the first templates into your theme. - -Example paths: - -* custom/plugins/MyTheme/Resources/views/email/global/order_transaction.state.paid/html.twig - content of the sOrder in HTML form -* custom/plugins/MyTheme/Resources/views/email/global/order_transaction.state.paid/plain.twig - content of the sOrder in text form -* custom/plugins/MyTheme/Resources/views/email/global/order_transaction.state.paid/subject.twig - title of the sOrder Mailion) - -The plugin is provided by the Github Organization [FriendsOfShopware](https://github.com/FriendsOfShopware/). -Maintainer of the plugin is [Soner Sayakci](https://github.com/shyim). -You can find the Github Repository [here](https://github.com/FriendsOfShopware/FroshPlatformTemplateMail) -[For questions / errors please create a Github Issue](https://github.com/FriendsOfShopware/FroshPlatformTemplateMail/issues/new) diff --git a/src/Resources/store/icon.png b/src/Resources/store/icon.png deleted file mode 100644 index 885856b6e391cc84d714204bf9a596ca42f432b8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10151 zcmV;YCs^2tP)UCHJ52xAV9r zPQFM= z1jUCg(p(OjcyUYc^lN=oy|%vQRPc2t_bN?=P2lDw0tOxto^`(V37T-BZqTHQ)9|_9 z=Zi2sz*v$%`jGjL|HOFK1<$zNRn>iCDZI+T{mo{=4h!MiX0dRu^qEt@(BsuY=G==6 zU97*JFH$jq$&?mh5{#h>)xQT%xim`EV{=jA=I7w?R%c-?gv@&=R9)7%1dcrYE+#o9 zbcsOdrZeR#>l3;({%=ft+Kf(H z5RyU{JUIr9QP06c<>*$fVb+DQ-7?|Ra&AEI)GNa=p4%7?SumbN2=KQ-V}7eCwSilu z&x9Qrz`xH zy?Se5DX{$r|Nh^GhRnLN5-Zu1)$u@kT!mI^EH#10JKcmGDd1eJvTzJ4?iw`l&*7MS zUTM~#(8ao|L1Taas0xwr>$uz^5Ip&>4iH9-wZ{`O_rV^&PAd!ewT~2l z9U-%B3stxE#X{yiI&N)dGeLc051;M%L0=Ewmh(kMaPZ47@~47b?p3~Y#`hL^8jb;lneV|<{~j(acpEU>y#L+}9P`WjMUIm2e6NQ{58e%j!~Oi+ zC1mEUS^QcX5sbns0fUZI%)gxSxYa*kzob{O+RoXK;Y@JH)_6A@>F!m3VEW_fy9?vl zR}B+%-KOJ-Pza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@p3D!N0GI+jy}_nV;egb zQR7d9t3P?zROdX%*m+RKLs~H}6Q@HYG0t`y1UZVP#d_+Z#XvVV1L=IJa#l6ihCtO4 zOfq>L4~GF}&UgMjt^To+Ge0~5{Mip4{LD~ed55sR-81rx6;Kg4Rr--Yd{-lM&ghVR z7!rZ3mpRwG-4fT+O)o~(F70XrbIH|A63)I%+*uewD7-sh$@XAE&aLU6?TBuvo9?Os z+8*6y+Ug3eNA$zKOn#1QnJ-)4nJ6s`hfNdHs|-DHi{%`2U9uuuIRjz~lG=X%a><-2 z=%Z|3`~Kqzm~g%Lz})?--;I+E=2jurkz?hHJ#%zKa$tRpHlsUvjjDFF;5n~$+lgM2ho&EZAVeEr<#AIlU*m2+()hc8duOf-^8NPN< zw)>M~f5P*RvCtp3mgN!Q{%FwxrvjQ!5%$`vM_T?i-&`;3dK$hFu?W?mr&lmLecM`| z2vw7F%}u>?1CRZsJ}N!hk^gc8b+wgRkfYGlj&RGY&!+U-lak!-*__{155{li>iUrf z;8R%Lgc&=C`IaWOFTc206pi49HC8rX0l5T>=WjZrSLdnSYlF-fXm}_I;YdcreateMock(Connection::class); - $connection->method('fetchAllAssociative')->willReturn([ - [ - 'content_plain' => 'My content', - 'content_html' => '

My content

', - 'subject' => 'Test template', - 'technical_name' => 'test_template', - 'locale' => 'en', - ], - ]); - - $command = new ExportCommand($connection); - - $tester = new CommandTester($command); - $tester->execute(['directory' => sys_get_temp_dir()]); - - $htmlFile = sys_get_temp_dir() . '/en/test_template/html.twig'; - $plainFile = sys_get_temp_dir() . '/en/test_template/plain.twig'; - $subjectFile = sys_get_temp_dir() . '/en/test_template/subject.twig'; - - static::assertFileExists($htmlFile); - static::assertFileExists($plainFile); - static::assertFileExists($subjectFile); - - static::assertEquals('

My content

', file_get_contents($htmlFile)); - static::assertEquals('My content', file_get_contents($plainFile)); - static::assertEquals('Test template', file_get_contents($subjectFile)); - - static::assertSame(0, $tester->getStatusCode()); - static::assertStringContainsString('Files has been exported', $tester->getDisplay()); - } -} diff --git a/tests/DependencyInjection/CacheCompilerPassTest.php b/tests/DependencyInjection/CacheCompilerPassTest.php deleted file mode 100644 index da99edd..0000000 --- a/tests/DependencyInjection/CacheCompilerPassTest.php +++ /dev/null @@ -1,42 +0,0 @@ -buildContainer(); - $c->setParameter('kernel.environment', 'dev'); - $c->compile(); - - static::assertFalse($c->hasDefinition(CachedMailFinderService::class)); - } - - public function testCacheStaysInProd(): void - { - $c = $this->buildContainer(); - $c->compile(); - - static::assertTrue($c->hasDefinition(CachedMailFinderService::class)); - } - - private function buildContainer(): ContainerBuilder - { - $container = new ContainerBuilder(); - $container->addCompilerPass(new CacheCompilerPass()); - $d = new Definition(); - $d->setPublic(true); - $container->setDefinition(CachedMailFinderService::class, $d); - $container->setParameter('kernel.environment', 'prod'); - - return $container; - } -} diff --git a/tests/Extension/MailTemplateExtensionTest.php b/tests/Extension/MailTemplateExtensionTest.php deleted file mode 100644 index 9138364..0000000 --- a/tests/Extension/MailTemplateExtensionTest.php +++ /dev/null @@ -1,40 +0,0 @@ -getMockBuilder(FieldCollection::class) - ->disableOriginalConstructor() - ->onlyMethods(['add']) - ->getMock(); - - $collection - ->expects(static::once()) - ->method('add') - ->withConsecutive( - [ - (new StringField('frosh_template_mail', 'froshTemplateMail'))->addFlags(new Runtime()), - ] - ); - - (new MailTemplateExtension())->extendFields($collection); - } - - public function testGetDefinitionClassReturnsMailTemplateDefinitionClass(): void - { - static::assertSame( - MailTemplateDefinition::class, - (new MailTemplateExtension())->getDefinitionClass() - ); - } -} diff --git a/tests/Integration/OrderTest.php b/tests/Integration/OrderTest.php deleted file mode 100644 index 671414e..0000000 --- a/tests/Integration/OrderTest.php +++ /dev/null @@ -1,192 +0,0 @@ -orderService = $this->getContainer()->get(OrderService::class); - - $this->orderRepository = $this->getContainer()->get('order.repository'); - - $this->addCountriesToSalesChannel(); - - $contextFactory = $this->getContainer()->get(SalesChannelContextFactory::class); - $this->salesChannelContext = $contextFactory->create( - '', - Defaults::SALES_CHANNEL, - [SalesChannelContextService::CUSTOMER_ID => $this->createCustomer('Jon', 'Doe')] - ); - } - - public function testOrderConfirmationMail(): void - { - $eventDispatcher = $this->getContainer()->get('event_dispatcher'); - $mailSentEvent = null; - - $eventDispatcher->addListener(MailSentEvent::class, function (MailSentEvent $e) use(&$mailSentEvent) { - $mailSentEvent = $e; - }); - - $this->performOrder(); - - static::assertNotNull($mailSentEvent, 'Mail did not sent'); - - static::assertSame( - [ - 'text/html' => 'HTML CONFIRM', - 'text/plain' => "TEXT CONFIRM" - ], - $mailSentEvent->getContents() - ); - static::assertSame('SUBJECT CONFIRM', $mailSentEvent->getSubject()); - } - - private function fillCart(string $contextToken): void - { - $cart = $this->getContainer()->get(CartService::class)->createNew($contextToken); - - $productId = $this->createProduct(); - $cart->add(new LineItem('lineItem1', LineItem::PRODUCT_LINE_ITEM_TYPE, $productId)); - $cart->setTransactions($this->createTransaction()); - } - - private function createProduct(): string - { - $productId = Uuid::randomHex(); - - $product = [ - 'id' => $productId, - 'name' => 'Test product', - 'productNumber' => '123456789', - 'stock' => 1, - 'price' => [ - ['currencyId' => Defaults::CURRENCY, 'gross' => 19.99, 'net' => 10, 'linked' => false], - ], - 'manufacturer' => ['id' => $productId, 'name' => 'shopware AG'], - 'tax' => ['id' => $this->getValidTaxId(), 'name' => 'testTaxRate', 'taxRate' => 15], - 'categories' => [ - ['id' => $productId, 'name' => 'Test category'], - ], - 'visibilities' => [ - [ - 'id' => $productId, - 'salesChannelId' => Defaults::SALES_CHANNEL, - 'visibility' => ProductVisibilityDefinition::VISIBILITY_ALL, - ], - ], - ]; - - $this->getContainer()->get('product.repository')->create([$product], Context::createDefaultContext()); - - return $productId; - } - - private function createTransaction(): TransactionCollection - { - return new TransactionCollection([ - new Transaction( - new CalculatedPrice( - 13.37, - 13.37, - new CalculatedTaxCollection(), - new TaxRuleCollection() - ), - $this->getValidPaymentMethodId() - ), - ]); - } - - private function performOrder(): string - { - $data = new RequestDataBag(['tos' => true]); - $this->fillCart($this->salesChannelContext->getToken()); - - return $this->orderService->createOrder($data, $this->salesChannelContext); - } - - private function createCustomer(string $firstName, string $lastName, array $options = []): string - { - $customerId = Uuid::randomHex(); - $salutationId = $this->getValidSalutationId(); - $paymentMethodId = $this->getValidPaymentMethodId(); - - $customer = [ - 'id' => $customerId, - 'salesChannelId' => Defaults::SALES_CHANNEL, - 'defaultShippingAddress' => [ - 'id' => $customerId, - 'firstName' => $firstName, - 'lastName' => $lastName, - 'city' => 'Schöppingen', - 'street' => 'Ebbinghoff 10', - 'zipcode' => '48624', - 'salutationId' => $salutationId, - 'countryId' => $this->getValidCountryId(), - ], - 'defaultBillingAddressId' => $customerId, - 'defaultPaymentMethodId' => $paymentMethodId, - 'groupId' => Defaults::FALLBACK_CUSTOMER_GROUP, - 'email' => Uuid::randomHex() . '@example.com', - 'password' => 'not', - 'firstName' => $firstName, - 'lastName' => $lastName, - 'salutationId' => $salutationId, - 'customerNumber' => '12345', - ]; - - $customer = array_merge_recursive($customer, $options); - - $this->getContainer()->get('customer.repository')->create([$customer], Context::createDefaultContext()); - - return $customerId; - } -} diff --git a/tests/Integration/SetupExampleTemplatesTrait.php b/tests/Integration/SetupExampleTemplatesTrait.php deleted file mode 100644 index 5cd51af..0000000 --- a/tests/Integration/SetupExampleTemplatesTrait.php +++ /dev/null @@ -1,51 +0,0 @@ - 'HTML CONFIRM', - 'global/order_confirmation_mail/plain.twig' => 'TEXT CONFIRM', - 'global/order_confirmation_mail/subject.twig' => 'SUBJECT CONFIRM', - ]; - - /** - * @before - */ - public function setupTemplates(): void - { - $fs = new Filesystem(); - - $resources = $this->getResourcesFolder(); - foreach ($this->tplFiles as $tplFile => $content) { - $file = $resources . '/' . $tplFile; - $folder = dirname($file); - $fs->mkdir($folder); - - $fs->dumpFile($file, $content); - } - } - - /** - * @after - */ - public function removeTemplates(): void - { - $fs = new Filesystem(); - - $resources = $this->getResourcesFolder(); - foreach ($this->tplFiles as $tplFile => $content) { - $file = $resources . '/' . $tplFile; - $fs->remove($file); - } - } - - private function getResourcesFolder(): string - { - return dirname(__DIR__, 2) . '/src/Resources/views/email/'; - } -} diff --git a/tests/Services/MailLoader/CachedMailFinderServiceTest.php b/tests/Services/MailLoader/CachedMailFinderServiceTest.php deleted file mode 100644 index a7f894c..0000000 --- a/tests/Services/MailLoader/CachedMailFinderServiceTest.php +++ /dev/null @@ -1,31 +0,0 @@ -createMock(MailFinderService::class); - $mailFinder->method('findTemplateByTechnicalName')->willReturnCallback(function () { return (string) microtime(true); }); - - $cachedMailFinder = new CachedMailFinderService($mailFinder, new ArrayAdapter()); - $event = $this->createMock(TemplateMailBusinessEvent::class); - $event->method('getName')->willReturn('foo'); - $event->method('getSalesChannelId')->willReturn('foo'); - $event->method('getContext')->willReturn(Context::createDefaultContext()); - $event->method('getConfig')->willReturn([]); - - - $time = $cachedMailFinder->findTemplateByTechnicalName('', '', $event); - static::assertSame($time, $cachedMailFinder->findTemplateByTechnicalName('', '', $event)); - } -} diff --git a/tests/Services/MailLoader/InkyLoaderTest.php b/tests/Services/MailLoader/InkyLoaderTest.php deleted file mode 100644 index 9792a94..0000000 --- a/tests/Services/MailLoader/InkyLoaderTest.php +++ /dev/null @@ -1,24 +0,0 @@ -supportedExtensions()); - - $text = $loader->load(__DIR__ . '/_fixtures/test.inky'); - static::assertStringContainsString('supportedExtensions()); - - $text = $loader->load(__DIR__ . '/_fixtures/test.mjml'); - static::assertStringContainsString('', $text); - static::assertStringContainsString('', $text); - } - - public function testApiIsNotAvailable(): void - { - $mock = new MockHandler([ - new ServerException('Error Communicating with Server', new Request('GET', 'test'), new Response(500)) - ]); - - $handlerStack = HandlerStack::create($mock); - $client = new Client(['handler' => $handlerStack]); - - $loader = new MjmlLoader(new NullLogger(), $client); - - static::assertSame('', $loader->load(__DIR__ . '/_fixtures/test.mjml')); - } - - public function testApiRespondsErrors(): void - { - $mock = new MockHandler([ - new Response(200, ['Content-Type' => 'application/json'], json_encode(['errors' => ['some error happend']])) - ]); - - $handlerStack = HandlerStack::create($mock); - $client = new Client(['handler' => $handlerStack]); - - $loader = new MjmlLoader(new NullLogger(), $client); - - static::expectException(MjmlCompileError::class); - $loader->load(__DIR__ . '/_fixtures/test.mjml'); - } -} diff --git a/tests/Services/MailLoader/TwigLoaderTest.php b/tests/Services/MailLoader/TwigLoaderTest.php deleted file mode 100644 index bd06253..0000000 --- a/tests/Services/MailLoader/TwigLoaderTest.php +++ /dev/null @@ -1,19 +0,0 @@ -supportedExtensions()); - static::assertNotEmpty($loader->load($storefront->getPath() . '/Resources/views/storefront/base.html.twig')); - } -} diff --git a/tests/Services/MailLoader/_fixtures/test.inky b/tests/Services/MailLoader/_fixtures/test.inky deleted file mode 100644 index e514481..0000000 --- a/tests/Services/MailLoader/_fixtures/test.inky +++ /dev/null @@ -1,5 +0,0 @@ - - - Put content in me! - - diff --git a/tests/Services/MailLoader/_fixtures/test.mjml b/tests/Services/MailLoader/_fixtures/test.mjml deleted file mode 100644 index 004b668..0000000 --- a/tests/Services/MailLoader/_fixtures/test.mjml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - Hello World - - - - diff --git a/tests/Services/SearchPathProviderTest.php b/tests/Services/SearchPathProviderTest.php deleted file mode 100644 index 7dd8ecf..0000000 --- a/tests/Services/SearchPathProviderTest.php +++ /dev/null @@ -1,83 +0,0 @@ -createMock(EntityRepository::class); - - $language = new LanguageEntity(); - $language->setId(Defaults::LANGUAGE_SYSTEM); - $locale = new LocaleEntity(); - $locale->setCode('en-GB'); - $language->setLocale($locale); - $repository->method('search')->willReturn(new EntitySearchResult('language', 1, new EntityCollection([$language]), null, new Criteria(), Context::createDefaultContext())); - - $provider = new SearchPathProvider($repository); - static::assertSame($expectedPaths, $provider->buildPaths($event)); - } - - public function eventProvider(): iterable - { - // Without sales channel source - - yield [ - $this->createEvent(), - [ - '98432def39fc4624b33213a56b8c944d/en-GB', // Sales channel and language combo - '98432def39fc4624b33213a56b8c944d', // Sales channel - 'en-GB', // Language code - '2fbb5fe2e29a4d70aa5854ce7ce3e20b', // Language id - 'global' // Global - ] - ]; - - // With sales channel source - - yield [ - $this->createEvent(true), - [ - '98432def39fc4624b33213a56b8c944d/en-GB', // Sales channel and language combo - '98432def39fc4624b33213a56b8c944d', // Sales channel - 'en-GB', // Language code - '2fbb5fe2e29a4d70aa5854ce7ce3e20b', // Language id - 'global' // Global - ] - ]; - } - - private function createEvent(bool $salesChannelSource = false): BusinessEvent - { - $context = new Context( - $salesChannelSource ? new SalesChannelApiSource(Defaults::SALES_CHANNEL) : new SystemSource() - ); - - $innerEvent = new ContactFormEvent($context, Defaults::SALES_CHANNEL, new MailRecipientStruct([]), new DataBag()); - - return new BusinessEvent('mail', $innerEvent, []); - } - -} diff --git a/tests/Services/StringTemplateRendererTest.php b/tests/Services/StringTemplateRendererTest.php deleted file mode 100644 index 8ec3625..0000000 --- a/tests/Services/StringTemplateRendererTest.php +++ /dev/null @@ -1,29 +0,0 @@ -render('{{ text }}', ['text' => 'foo'], Context::createDefaultContext())); - } - - public function testInvalidString(): void - { - $renderer = new StringTemplateRenderer(new Environment(new ArrayLoader())); - - static::expectException(StringTemplateRenderingException::class); - - $renderer->render('{{ text() }}', [], Context::createDefaultContext()); - } -} diff --git a/tests/TestBootstrap.php b/tests/TestBootstrap.php deleted file mode 100644 index c833cc2..0000000 --- a/tests/TestBootstrap.php +++ /dev/null @@ -1,52 +0,0 @@ -addPsr4('Frosh\\TemplateMail\\Tests\\', dirname(__DIR__) . '/tests'); - -if (class_exists('\Shopware\Core\Kernel')) { - $_SERVER['KERNEL_CLASS'] = '\Shopware\Core\Kernel'; -} else if (class_exists('\Shopware\Development\Kernel')) { - $_SERVER['KERNEL_CLASS'] = '\Shopware\Development\Kernel'; -} else if(class_exists('Shopware\Production\Kernel')) { - $_SERVER['KERNEL_CLASS'] = 'Shopware\Production\Kernel'; -} else { - throw new \RuntimeException('Cannot detect kernel class by own.'); -} - -(new Dotenv(true))->load($testProjectDir . '/.env'); - -$dbUrl = \getenv('DATABASE_URL'); -if ($dbUrl !== false) { - \putenv('DATABASE_URL=' . $dbUrl . '_test'); -} - -// Creates DB connection -KernelLifecycleManager::bootKernel();