/**
  * @test
  */
 public function buildUrl()
 {
     $expected = 'wget --no-check-certificate --convert-links --load-cookies=cookies.txt --execute robots=off --tries=30 --retry-connrefused --server-response --directory-prefix=2014-11-28-0958 --domains=test.punkt.de --page-requisites --output-file="2014-11-28-0958.log" --no-verbose "http://test.punkt.de/page/"';
     $this->wgetCommand->setWgetBinaryPath('wget')->setNoCheckCertificate(true)->setExecute('robots=off')->setConvertLinks(true)->setLoadCookies('cookies.txt')->setTries(30)->setDomains('test.punkt.de')->setRetryConnRefused(true)->setServerResponse(true)->setDirectoryPrefix('2014-11-28-0958')->setPageRequisites(true)->setOutputFile('2014-11-28-0958.log')->setUrl('http://test.punkt.de/page/');
     $actual = $this->wgetCommand->getCommand();
     $this->assertEquals($expected, $actual);
 }
Beispiel #2
0
 /**
  * @test
  */
 public function downloadExistingPage()
 {
     $this->wgetCommand->setOutputFile(Files::concatenatePaths(array($this->workingDirectory, 'wget.log')))->setDirectoryPrefix($this->workingDirectory)->setNoVerbose(true)->setServerResponse(true)->setUrl('http://localhost/')->execute();
     $log = $this->wgetLogParser->parseLog($this->wgetCommand);
     $this->assertFalse($log->hasErrors());
     $this->assertFileExists(Files::concatenatePaths(array($this->workingDirectory, 'index.html')));
 }