[issue #8] Added PHPUnit tests.