1

I am using Codeship to run some PHPUnit tests for WordPress.

Tests written with WP_UnitTestCase work fine.

class ActionHookTests extends WP_UnitTestCase {
    function test_things() {
        // this runs fine
    }
}

However, my selenium tests won't run:

class TestIntegration extends PHPUnit_Extensions_SeleniumTestCase {
    function test_things() {
        // this throws an error
    }
}

The following error is thrown in Codeship:

PHP Fatal error: Class 'PHPUnit_Extensions_SeleniumTestCase' not found

However, the tests run fine on my local machine.

This is my composer.json file:

{
    "require-dev": {
        "phpunit/phpunit": "4.6.*",
        "phpunit/phpunit-selenium": ">=1.2"
    }
}
Ben Cole
  • 1,847
  • 1
  • 15
  • 18

1 Answers1

0

Did you try composer install?

composer install --prefer-source --no-interaction

https://codeship.com/documentation/languages/php/

Martin
  • 109
  • 8