waaz/payline-plugin

Sylius 的 Payline 支付插件

安装: 54

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:sylius-plugin

This package is not auto-updated.

Last update: 2024-09-13 00:48:23 UTC


README

插件骨架

用于启动 Sylius 插件的骨架。

安装

  1. 运行 composer create-project sylius/plugin-skeleton ProjectName.

  2. 从插件骨架根目录,运行以下命令

    $ (cd tests/Application && yarn install)
    $ (cd tests/Application && yarn build)
    $ (cd tests/Application && bin/console assets:install public -e test)
    
    $ (cd tests/Application && bin/console doctrine:database:create -e test)
    $ (cd tests/Application && bin/console doctrine:schema:create -e test)

为了能够设置插件数据库,请记住在 tests/Application/.envtests/Application/.env.test 中配置您的数据库凭据。

使用方法

运行插件测试

  • PHPUnit

    $ vendor/bin/phpunit
  • PHPSpec

    $ vendor/bin/phpspec run
  • Behat(非 JS 场景)

    $ vendor/bin/behat --tags="~@javascript"
  • Behat(JS 场景)

    1. 下载 Chromedriver

    2. 下载 Selenium Standalone Server.

    3. 使用之前下载的 Chromedriver 运行 Selenium 服务器

      $ java -Dwebdriver.chrome.driver=chromedriver -jar selenium-server-standalone.jar
    4. localhost:8080 上运行测试应用程序的 web 服务器

      $ (cd tests/Application && bin/console server:run localhost:8080 -d public -e test)
    5. 运行 Behat

      $ vendor/bin/behat --tags="@javascript"

使用您的插件打开 Sylius

  • 使用 test 环境

    $ (cd tests/Application && bin/console sylius:fixtures:load -e test)
    $ (cd tests/Application && bin/console server:run -d public -e test)
  • 使用 dev 环境

    $ (cd tests/Application && bin/console sylius:fixtures:load -e dev)
    $ (cd tests/Application && bin/console server:run -d public -e dev)