return $prefix . $num;
}
- protected function getType($content)
+ public function getType($content)
{
$tmp = tempnam(sys_get_temp_dir(), 'phorkie-autodetect-');
file_put_contents($tmp, $content);
$sc->checkDirs();
$sc->checkGit();
$sc->checkDatabase();
+ $sc->checkMimeTypeDetection();
}
public function checkDeps()
$dbs->getSetup()->setup();
}
+ public function checkMimeTypeDetection()
+ {
+ $rp = new Repository_Post();
+ if ($rp->getType('<?php echo "foo"; ?>') != 'php') {
+ $this->fail('MIME type detection fails');
+ }
+ }
+
public function fail($msg)
{
throw new Exception($msg);