ORIENT/tests
Samuel Georges 9696375099 Fixes functional tests so they pass, add details about selenium set up 2015-03-02 17:18:53 +11:00
..
fixtures Move plugin/theme fixtures so they are shared 2015-02-10 17:45:07 +11:00
functional Fixes functional tests so they pass, add details about selenium set up 2015-03-02 17:18:53 +11:00
unit Rem incomplete tests 2015-03-02 16:05:26 +11:00
README.md Fixes functional tests so they pass, add details about selenium set up 2015-03-02 17:18:53 +11:00
TestCase.php Fixes unit tests so they pass 2015-03-02 16:02:13 +11:00
UiTestCase.php Fixes functional tests so they pass, add details about selenium set up 2015-03-02 17:18:53 +11:00

README.md

Unit tests

Unit tests can be performed by running phpunit in the root directory or inside /tests/unit.

Functional tests

Functional tests can be performed by running phpunit in the /tests/functional directory. Ensure the following configuration is met:

  • Active theme is demo
  • Language preference is en

Selenium set up

  1. Download latest Java SE from http://java.sun.com/ and install
  2. Download a distribution archive of Selenium Server.
  3. Unzip the distribution archive and copy selenium-server-standalone-2.42.2.jar (check the version suffix) to /usr/local/bin, for instance.
  4. Start the Selenium Server server by running java -jar /usr/local/bin/selenium-server-standalone-2.42.2.jar.

Selenium configuration

Create a new file selenium.php in the root directory, add the following content:

<?php

// Selenium server details
define('TEST_SELENIUM_HOST', '127.0.0.1');
define('TEST_SELENIUM_PORT', 4444);
define('TEST_SELENIUM_URL', 'http://localhost/backend/');
define('TEST_SELENIUM_BROWSER', '*firefox');


// OctoberCMS details
define('TEST_SELENIUM_THEME', 'demo');
define('TEST_SELENIUM_USER', 'admin');
define('TEST_SELENIUM_PASS', 'admin');