Beispiel #1
0
 public function testBad()
 {
     $detective = new ImageDetective();
     $detective->check(__DIR__ . "/files/normal.png");
     $this->assertNotEquals('jpg', $detective->getExtension());
     $detective = new ImageDetective();
     $detective->check(__DIR__ . "/files/png.jpg");
     $this->assertNotEquals('jpg', $detective->getExtension());
 }
Beispiel #2
0
 public function testSWF()
 {
     $detective = new FlashDetective();
     $detective->check(__DIR__ . "/files/normal.swf");
     $this->assertEquals('swf', $detective->getExtension());
 }
Beispiel #3
0
 /**
  * @expectedException \InfinityNext\Sleuth\Exceptions\CaseNotSolved
  */
 public function testException()
 {
     $detective = new ImageDetective();
     $detective->check(__DIR__ . "/files/normal.pdf");
     $detective->getExtension();
 }