Development environment for amp-wp plugin
- Clone the Git repo with submodules
git clone https://github.com/ediamin/amp-wp-dev.git --recursive
- Build AMP WP plugin and WordPress Develop
npm install
- Start wp-env
npm start
Dev Site: http://localhost:1234 username: admin password: password
Run all tests
npm run phpunit
Run specific test file
npm run phpunit --args=./tests/php/test-amp.php
Run specific test method
npm run phpunit --args='./tests/php/test-amp.php --filter=test_amp_is_canonical'
npm start
will spin up docker with xdebug. It is available in both wordpress and test-wordpress containers. VSCode configuration is already in this repo.- Not sure why some tests fail in
tests-cli
container. phpunit
inphpunit
container won't work because we need lower version of phpunit to run the tests.