bitbag / smash-promotion-plugin
Smash promotion plugin for Sylius.
Installs: 34
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Type:sylius-plugin
Requires
- php: ^7.2
- sylius/sylius: ^1.4
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/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.0
- friends-of-behat/symfony-extension: ^2.0
- friends-of-behat/variadic-extension: ^1.1
- lakion/mink-debug-extension: ^1.2.3
- phpspec/phpspec: ^5.0
- phpstan/phpstan-doctrine: ^0.10
- phpstan/phpstan-shim: ^0.10
- phpstan/phpstan-webmozart-assert: ^0.10
- sensiolabs/security-checker: ^5.0
- sylius-labs/coding-standard: ^2.0
- symfony/browser-kit: ^3.4|^4.1
- symfony/debug-bundle: ^3.4|^4.1
- symfony/dotenv: ^4.2
- symfony/intl: ^3.4|^4.1
- symfony/web-profiler-bundle: ^3.4|^4.1
- symfony/web-server-bundle: ^3.4|^4.1
Conflicts
- symfony/browser-kit: 4.1.8
- symfony/dependency-injection: 4.1.8
- symfony/dom-crawler: 4.1.8
- symfony/routing: 4.1.8
- symfony/symfony: 4.1.8
This package is auto-updated.
Last update: 2021-08-29 02:26:35 UTC
README
Plugin Skeleton
Skeleton for starting Sylius plugins.
Installation
-
Run
composer create-project sylius/plugin-skeleton ProjectName
. -
From the plugin skeleton root directory, run the following commands:
$ (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)
To be able to setup a plugin's database, remember to configure you database credentials in tests/Application/.env
and tests/Application/.env.test
.
Usage
Running plugin tests
-
PHPUnit
$ vendor/bin/phpunit
-
PHPSpec
$ vendor/bin/phpspec run
-
Behat (non-JS scenarios)
$ vendor/bin/behat --tags="~@javascript"
-
Behat (JS scenarios)
-
Download Chromedriver
-
Download Selenium Standalone Server.
-
Run Selenium server with previously downloaded Chromedriver:
$ java -Dwebdriver.chrome.driver=chromedriver -jar selenium-server-standalone.jar
-
Run test application's webserver on
localhost:8080
:$ (cd tests/Application && bin/console server:run localhost:8080 -d public -e test)
-
Run Behat:
$ vendor/bin/behat --tags="@javascript"
-
Opening Sylius with your plugin
-
Using
test
environment:$ (cd tests/Application && bin/console sylius:fixtures:load -e test) $ (cd tests/Application && bin/console server:run -d public -e test)
-
Using
dev
environment:$ (cd tests/Application && bin/console sylius:fixtures:load -e dev) $ (cd tests/Application && bin/console server:run -d public -e dev)