Using your choice of PHP framework (Laravel, Lumen, Kohana, Silex, etc) or testing suite (phpunit)
create a separate class, called “Database” with a method “getMessage()”
which returns “Cohesion Digital”.
Create an other class, called “Servlet”, which uses this class to print out the return value of Database’s getMessage().
Implement a dependency injection pattern to use Database inside Servlet when Servlet is instantiated. You can instantiate the servlet using an Object Manager or Factory or unit test.
Make sure the code is tidy for review. Push it to a public GitHub (or
Bitbucket) repository and send us the link.