use phpunit exception handle for undefined Variable error