woocommerce/tests/bin
Rodrigo Primo 48480eb882 Fix unit tests when running using WP nightly
The WooCommerce unit tests started failing when running using WP nightly
with the following error:

```
Fatal error: require_once(): Failed opening required '/tmp/wordpress-tests-lib/src//wp-includes/class-phpmailer.php' (include_path='.:/home/travis/.phpenv/versions/7.4.2/share/pear') in /tmp/wordpress-tests-lib/includes/mock-mailer.php on line 2
```

https://travis-ci.org/woocommerce/woocommerce/jobs/646855363#L1955

This was happening because WP changed the syntax of the line where
ABSPATH is defined in the context of the unit tests
(https://core.trac.wordpress.org/changeset/47198/trunk/wp-tests-config-sample.php)
and we rely on this syntax to change ABSPATH when running
`tests/bin/install.sh`.

To fix this problem, this commit updates the sed command used to change
ABSPATH to work when both the old and new syntaxes are used. In the
future we might want to consider a more robust solution to the problem
of updating ABSPATH.
2020-02-06 12:43:47 -03:00
..
e2e-test-integration.js Pass jest exit code to npm 2019-12-15 22:34:35 +00:00
install.sh Fix unit tests when running using WP nightly 2020-02-06 12:43:47 -03:00
phpcs.sh Install sniffs only when running PHPCS. 2019-07-04 10:17:39 +02:00
phpunit.sh Implement Puppeteer architecture & add basic test 2019-08-23 11:34:07 +01:00
run-e2e-CI.sh Update comments in `run-e2e-CI.sh` 2019-12-20 00:10:44 +00:00
travis.sh Remove taking screenshots sent to AWS on failed tests 2020-01-24 17:17:52 +00:00