woocommerce-paypal-payments/tests/integration
Emili Castells Guasch eb8ed21536
Some checks failed
Build and distribute / build-and-distribute (push) Has been cancelled
CI / coding-standards-analysis-php (push) Has been cancelled
CI / static-code-analysis-php (push) Has been cancelled
CI / tests-unit-php (7.4) (push) Has been cancelled
CI / tests-unit-php (8.0) (push) Has been cancelled
CI / tests-unit-php (8.1) (push) Has been cancelled
CI / tests-unit-php (8.2) (push) Has been cancelled
CI / tests-unit-php (8.3) (push) Has been cancelled
CI / tests-unit-php (8.4) (push) Has been cancelled
Remove ProductPriceCalculator, always use IsolatedCartSimulator for accurate totals
2026-04-15 14:46:50 +02:00
..
data Rename e2e to integration 2025-03-12 18:14:01 +01:00
PHPUnit Remove ProductPriceCalculator, always use IsolatedCartSimulator for accurate totals 2026-04-15 14:46:50 +02:00
phpunit.xml.dist Rename e2e to integration 2025-03-12 18:14:01 +01:00
README.md Update integration tests readme 2025-12-10 09:53:39 +02:00

Integration Tests

PHPUnit tests that runs against a working WP site. Useful to test modules (ex. classes) together without having the use test doubles but the real infrastructure.

Setup test environment

  • Setup DDEV (if not already): ddev start && ddev orchestrate
  • Install and activate WooCommerce Subscriptions plugin.
  • Run ddev npm run integration-tests
  • Edit .env.integration in the root if needed, set your DDEV url.

How to run the tests

  • Run all the tests: ddev npm run integration-tests
  • Run a single test: ddev npm run tdd:integration testSomeTestName or ddev npm run tdd:integration SomeTestClassName

How to debug tests

  • Run ddev xdebug enable
  • Setup your IDE to listen to new DEBUG connections
  • Run tests adding --debug flag: ddev exec phpunit -c tests/integration/phpunit.xml.dist --debug