public function loadFile($file_to_load = null)
{
if (!file_exists($file_to_load)) {
throw new \Noherczeg\Breadcrumb\FileNotFoundException("Can not load the requested language file: {$file_to_load}!");
} else {
return require $file_to_load;
}
}
/** * Test provide file not found thrown as exception * * @expectedException \Noherczeg\Breadcrumb\FileNotFoundException */ public function testFileNotFoundException() { $this->tran->loadFile(2); $this->tran->loadFile(); $this->tran->loadFile(true); $this->tran->loadFile('asd'); }