added phpunit tests, added database connection class, modify by PSR2