コード例 #1
0
 /**
  * Start checker.
  *
  * @return void
  */
 public function start()
 {
     $config = $this->getConfig();
     $results = [];
     foreach ($this->getUrls() as $url) {
         $results[$url] = Validator::validate($url, $config);
     }
     $this->outputResult($config['savePath'], $results);
 }
コード例 #2
0
 /**
  * @test
  */
 public function it_should_return_the_validate_result()
 {
     $result = Validator::validate('http://localhost:8000/index.html', ['timeout' => 2]);
     $this->assertEquals(['http://localhost:8000/index.html' => [404 => ['http://localhost:8000/assets/all.css', 'http://localhost:8000/link1.html', 'http://localhost:8000/link3.html'], 504 => ['http://localhost:8000/timeout.php']]], $result);
 }