mirror of
https://github.com/mosbth/cimage.git
synced 2025-08-05 23:57:30 +02:00
* Using CWhitelist
for checking hotlinking to images, fix #88.
* Added mode for `test` which enables logging verbose mode to file, fix #97.
This commit is contained in:
@@ -162,4 +162,19 @@ class CImageRemoteDownloadTest extends \PHPUnit_Framework_TestCase
|
||||
$res = $img->isRemoteSourceOnWhitelist("http://$hostname/img.jpg");
|
||||
$this->assertFalse($res, "Should not be a valid hostname on the whitelist: '$hostname'.");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
public function testRemoteHostWhitelistNotConfigured()
|
||||
{
|
||||
$img = new CImage();
|
||||
$res = $img->isRemoteSourceOnWhitelist(null);
|
||||
$this->assertTrue($res, "Should allow when whitelist not configured.");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user