joomla-projects / com_localise

forked version of the original com_localise for experimental purposes
GNU General Public License v2.0
24 stars 36 forks source link

Localise

This component was originally created by:

Yoshiki Kozaki, Mohammad Hasani Eghtedar,Christophe Demko, Jean-Marie Simonet and Ifan Evans.

We (the Joomla! Internationalisation Working Group) are forking it for experimental purposes.

If you want to join the effort please contact us!

Travis Status

Master: Build Status

Develop: Build Status

Scrutinizer Status

Scrutinizer Code Quality

The goal

With the new com_localise we are trying to solve the following needs:

Todo's (Tasks)

Tests

System Tests

See testing documentation for the system tests at tests/system/readme.md

PHP_CodeSniffer

All PHP files except for layout files (located in a /tmpl directory) should be formatted to follow the Joomla! Coding Standards. These are validated by using PHP_CodeSniffer. You can run the PHP_CodeSniffer in one of the following manners:

Requirements

Joomla 3.3 or above is needed to run this component.

Extension packager

There are two available ways to package the extension a PHING packager xml file (requires PHING) and a *nix shell script:

Phing packager

A PHING build file can be found at build/build.xml. After executing it you will have an installable .zip file under build/packages.

Shell script for *nix systems

To package, on a *nix system, navigate to the build folder and run ./build.sh. When complete, you will have an installable .zip file under build/packages.

Testing with Codeception

Codeception is a testing framework built in PHP, you can know more about it at http://codeception.com. We use Codeception for System Testing com_localise.

There are two ways to get and run codeception, via PHAR or via Composer.

Codeception.phar

Get codeception phar:

wget http://codeception.com/codecept.phar

Build codeception testers classes:

php ./codecept.phar build

using composer to get Codeception

Execute

# You need to have Composer in your system, if not download it from here: https://getcomposer.org/
composer update

After that you will be able to run Codeception doing:

php vendor/codeception/codeception/codecept build

Runing the tests

Rename tests/acceptance.suite.dist.yml to tests/acceptance.suite.yml

Modify the configuration at tests/acceptance.suite.yml to fit your server details. Find the instructions in the same file: https://github.com/redCOMPONENT-COM/redSHOP/blob/develop/tests/acceptance.suite.dist.yml#L3

Run Selenium server:

# Download
curl -O http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar

# And start the Selenium Server
java -Xms40m -Xmx256m -jar /Applications/XAMPP/xamppfiles/htdocs/selenium/selenium-server-standalone-2.41.0.jar

Execute the tests:

php codecept.phar run

; Or with --steps to see a step-by-step report on the performed actions.
php codecept.phar run --steps

; Or with --html. This command will run all tests for all suites, displaying the steps, and building HTML and XML reports. Reports will be store in tests/_output/ directory.
php codecept.phar run --html

Firefox Addons

To generate tests really fast you can use these firefox addons: