Check if connection already is connected, and add unit test for PDO Connection getResource method