converted Identity tests to phpunit