static function bookPath($cd, $bp, $file)
{
try {
$path = $cd . '/' . $bp . '/' . $file;
stat($path);
} catch (Exception $e) {
$p = explode("/", $bp);
$path = $cd . '/' . ucwords($p[0]) . '/' . $p[1] . '/' . $file;
}
return $path;
}
function testBookPath() { $this->assertEqual('tests/fixtures/lib2/Gotthold Ephraim Lessing/Lob der Faulheit (1)/Lob der Faulheit - Gotthold Ephraim Lessing.epub', Utilities::bookPath('tests/fixtures/lib2', 'Gotthold Ephraim Lessing/Lob der Faulheit (1)', 'Lob der Faulheit - Gotthold Ephraim Lessing.epub')); }