public function testSetAllowedExtensionsFail() { // .pl (Perl scripts) is not allowed $dl2 = new downloader(); $dl2->setAllowedExtensions(array('jpg' => 'image/jpeg', 'pl' => 'application/x-perl')); $this->assertTrue($dl2->areErrors()); // one invalid extension will invalidate the entire list $this->assertFalse($dl2->checkExtension('jpg')); $this->assertFalse($dl2->checkExtension('jpeg')); $this->assertFalse($dl2->checkExtension('pl')); }