Esempio n. 1
0
 function testDownloadURL()
 {
     if (TimberImageTest::is_connected()) {
         $url = 'http://i1.nyt.com/images/misc/nytlogo379x64.gif';
         $result = TimberURLHelper::download_url($url);
         $this->assertStringStartsWith('/tmp/nytlogo379x64', $result);
         $this->assertStringEndsWith('.tmp', $result);
     }
 }
 function testDownloadURL()
 {
     if (!TimberImageTest::is_connected()) {
         $this->markTestSkipped('Cannot test external images when not connected to internet');
         return;
     }
     $url = 'http://i1.nyt.com/images/misc/nytlogo379x64.gif';
     $result = TimberURLHelper::download_url($url);
     $this->assertContains('/nytlogo379x64', $result);
     $this->assertStringEndsWith('.tmp', $result);
 }
Esempio n. 3
0
 /**
  * @deprecated
  */
 static function download_url($url, $timeout = 300)
 {
     return TimberURLHelper::download_url($url, $timeout);
 }