locastic / sylius-catalog-promotion-plugin
Sylius 插件,允许您创建目录促销。
dev-master / 1.2.x-dev
2019-01-16 10:26 UTC
Requires
- php: ^7.1
- sylius/sylius: ^1.2
- symfony/config: ^3.4|^4.1
- symfony/console: ^3.4|^4.1
- symfony/dependency-injection: ^3.4|^4.1
- symfony/form: ^3.4|^4.1
- symfony/framework-bundle: ^3.4|^4.1
- symfony/http-kernel: ^3.4|^4.1
- symfony/options-resolver: ^3.4|^4.1
- symfony/validator: ^3.4|^4.1
Requires (Dev)
- behat/behat: ^3.4
- behat/mink: ^1.7@dev
- behat/mink-browserkit-driver: ^1.3
- behat/mink-extension: ^2.2
- behat/mink-selenium2-driver: ^1.3
- friends-of-behat/context-service-extension: ^1.2
- friends-of-behat/cross-container-extension: ^1.1
- friends-of-behat/service-container-extension: ^1.0
- friends-of-behat/symfony-extension: ^1.2.1
- friends-of-behat/variadic-extension: ^1.1
- lakion/mink-debug-extension: ^1.2.3
- phpspec/phpspec: ^4.0
- phpstan/phpstan-shim: ^0.9.2
- phpunit/phpunit: ^6.5
- sylius-labs/coding-standard: ^2.0
This package is auto-updated.
Last update: 2024-09-16 22:45:48 UTC
README
插件骨架
安装
-
运行
composer create-project sylius/plugin-skeleton ProjectName
。 -
从插件骨架根目录,运行以下命令
$ (cd tests/Application && yarn install) $ (cd tests/Application && yarn run gulp) $ (cd tests/Application && bin/console assets:install web -e test) $ (cd tests/Application && bin/console doctrine:database:create -e test) $ (cd tests/Application && bin/console doctrine:schema:create -e test)
用法
运行插件测试
-
PHPUnit
$ bin/phpunit
-
PHPSpec
$ bin/phpspec run
-
Behat(非JS场景)
$ bin/behat --tags="~@javascript"
-
Behat(JS场景)
-
下载 Chromedriver
-
使用之前下载的 Chromedriver 运行 Selenium 服务器
$ bin/selenium-server-standalone -Dwebdriver.chrome.driver=chromedriver
-
在
localhost:8080
上运行测试应用程序的 web 服务器$ (cd tests/Application && bin/console server:run 127.0.0.1:8080 -d web -e test)
-
运行 Behat
$ bin/behat --tags="@javascript"
-
使用您的插件打开 Sylius
-
使用
test
环境$ (cd tests/Application && bin/console sylius:fixtures:load -e test) $ (cd tests/Application && bin/console server:run -d web -e test)
-
使用
dev
环境$ (cd tests/Application && bin/console sylius:fixtures:load -e dev) $ (cd tests/Application && bin/console server:run -d web -e dev)