phpunit integration
fixes for event manager