“Nothing fetched” returned when running PHP SimpleTest on my localhost

StackOverflow https://stackoverflow.com/questions/9989617

  •  28-05-2021
  •  | 
  •  

سؤال

I'm trying to use SimpleTest to run a set of tests on a project, I always get "Nothing fetched" when running the tests on my localhost but it works totally fine when run these tests on a remote server.

I'm using on both my machine and the server Fedora 16 and Nginx, and i'm using the command line reporter to run these tests.

هل كانت مفيدة؟

المحلول

Use method setConnectionTimeout() of class WebTestCase. It is intended to be used for these purposes. You call it before get() method to set socket timeout.

For example:

class ContinuousTestCase extends WebTestCase {
    function testSuccess() {
        $this->setConnectionTimeout(300);  // takes about 5 minutes
        $this->assertTrue($this->get('http://localhost/continuous.php'));
    }
}

نصائح أخرى

Fixed! all i had to do is to increase the DEFAULT_CONNECTION_TIMEOUT in the simpletest/user_agent.php, for some reason my localhost is slower than the remote server.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top