2009-01-25 12:37:45 +00:00
|
|
|
<?php
|
2009-05-11 07:04:33 -07:00
|
|
|
class ImageHashBanTest extends WebTestCase {}
|
|
|
|
|
|
|
|
if(!defined(VERSION)) return;
|
|
|
|
|
2009-01-25 12:37:45 +00:00
|
|
|
class ImageHashBanUnitTest extends UnitTestCase {
|
|
|
|
public function _broken_testUploadFailsWhenBanned() {
|
|
|
|
$ihb = new ImageHashBan();
|
|
|
|
$due = new DataUploadEvent();
|
|
|
|
|
|
|
|
try {
|
|
|
|
$ihb->receive_event($due);
|
|
|
|
$this->assertTrue(false); // shouldn't work
|
|
|
|
}
|
|
|
|
catch(DataUploadException $ex) {
|
|
|
|
$this->assertTrue(true); // should fail
|
|
|
|
}
|
|
|
|
catch(Exception $ex) {
|
|
|
|
$this->assertTrue(false); // but not with any other error
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|