This project contains the testing application for Gewoon Toegankelijk, the daemon to start workers through the application, and a VM for testing.
All relative paths are relative to the repository root.
This project is a Symfony application that is built
around Symfony's
dependency injection component.
\Triquanta\AccessibilityMonitor\Application
is responsible for booting the
application and building the service container.
The service container is configured in
./application/container.yml and contains service
definitions and simple configuration parameters. Existing configuration can be
extended and overridden by creating ./application/container_overrides.yml
.
Both files contain
YAML container configuration.
./application/bin/tam is the application's CLI, which can control all of its functionality. It is built on Symfony's console component.
- Ensure a database has been created and its credentials are configured in the
testing application's
./application/container_overrides.yml
. - Run
./sql-dump/inspector-N.sql
(whereN
is the highest available version number) in the database ensured in the previous step.
cd ./application
composer install
cp ./container_overrides_example.yml ./container_overrides.yml
and extend/override the configuration where necessary, such as for remote server information and authentication credentials.- Make sure that the value of the
tmp_directory
configration is a directory path on the system that is writable by the user under which the workers run. The path defaults to/tmp/accessibilitymonitor
and can be overridden incontainer_overrides.yml
. mkdir /etc/accessibilitymonitor
echo $MAX > /etc/accessibilitymonitor/max_worker_count
, where$MAX
is the maximum number of concurrent workers for the machine.echo `pwd`/bin/tam start-worker > /etc/accessibilitymonitor/worker
echo `pwd`/bin/tam retest > /etc/accessibilitymonitor/retest
cp ./scripts/accessibilitymonitor.conf /etc/init/
start accessibilitymonitor
System events are logged to the console output, to file, and severe events also result in emails being sent to the project maintainers. This behavior is configured in the service container.
All code must be written according the PSR-2 guidelines.
Logging is done through Monolog. Its logger is used according PSR-3.
Class and interface autoloading is done using PSR-4 using the following namespace mappings:
\Triquanta\AccessibilityMonitor
maps to ./application/src\Triquanta\Tests\AccessibilityMonitor
maps to ./application/tests/src
The library comes with PHPUnit-based tests that can be
run using ./application/phpunit.xml.dist.
All tests are located in \Triquanta\Tests\AccessibilityMonitor
.
The Github repository is hooked up to Travis CI, which runs the tests after pushes, or for pull requests.
See ./vm/README.md.