enygma / frisk

An automated front-end unit testing testing tool written in PHP designed to mimic web requests and evaluate the response
http://testwithfrisk.com
14 stars 0 forks source link

PHP Fatal Error for unknown host #12

Closed gbcreation closed 13 years ago

gbcreation commented 13 years ago

Using the test/MyTest.php script provided with your tool, I get the following error for test2 :

PHP Fatal error: Call to a member function getBody() on a non-object in /var/www/html/enygma-frisk-f35ad84/lib/Assert/AssertContains.php on line 28 PHP Stack trace: PHP 1. {main}() /var/www/html/enygma-frisk-f35ad84/frisk:0 PHP 2. Runner->execute($tests = uninitialized) /var/www/html/enygma-frisk-f35ad84/frisk:34 PHP 3. MyTest->test2(class Message { }) /var/www/html/enygma-frisk-f35ad84/lib/Runner.php:39 PHP 4. MyTest->assertContains('oo th') /var/www/html/enygma-frisk-f35ad84/tests/MyTest.php:27 PHP 5. Test->__call($name = 'assertContains', $arg = array (0 => 'oo th')) /var/www/html/enygma-frisk-f35ad84/lib/Test.php:0 PHP 6. AssertContains->assertExecute() /var/www/html/enygma-frisk-f35ad84/lib/Test.php:51

Seems to work if 'test.localhost' is replaced by a known host (for example 'localhost'). Please print a user friendly error message if host is unknown.

enygma commented 13 years ago

Corrected in commit: http://github.com/enygma/frisk/commit/469ebec990b3019473129b8af8b2132976a08fb1

fails more gracefully now...