示例#1
0
 /**
  * @covers PsImg::getMime
  */
 public function testGetMime()
 {
     $this->assertEquals('image/png', PsImg::getMime('pNg'));
     $this->assertEquals('image/gif', PsImg::getMime('image/gif'));
     $this->assertEquals('image/jpeg', PsImg::getMime('jpg'));
     $this->assertEquals('image/jpeg', PsImg::getMime('JPEG'));
     $this->assertEquals('image/jpeg', PsImg::getMime(IMAGETYPE_JPEG));
     try {
         PsImg::getMime(self::NOT_ALLOWED_STR);
         $this->brakeNoException();
     } catch (PException $ex) {
     }
     try {
         PsImg::getMime(null);
         $this->brakeNoException();
     } catch (PException $ex) {
     }
 }