Exemple #1
0
 /**
  * Run analysis on a file and vardump the output to stdout
  *
  * Show what describr was able to work out about this file
  *
  * @param type $file Path to the file that is to be analysed
  */
 protected function analyseFile($file)
 {
     try {
         $response = $this->facade->describeFileAsArray($file);
         var_dump($response);
     } catch (FileNotFoundException $e) {
         echo "\nUnable to read file {$file}";
     }
 }
Exemple #2
0
 public function testDescribeFileTakesAFile3()
 {
     $facade = new Facade();
     $aResults = $facade->describeFileAsArray(dirname(__FILE__) . '/../../../../resources/test.wmv');
     $this->assertArrayHasKey('BoxUK\\General', $aResults);
     $this->assertArrayHasKey('BoxUK\\AudioVideo\\AsfVideo', $aResults);
     $this->assertArrayNotHasKey('BoxUK\\AudioVideo\\MpegVideo', $aResults);
     $this->assertArrayNotHasKey('BoxUK\\AudioVideo\\Audio', $aResults);
     $this->assertArrayNotHasKey('BoxUK\\Image', $aResults);
     $this->assertArrayNotHasKey('BoxUK\\PlainText', $aResults);
 }