/** * @issue ZF-2742 */ public function testGetHelperWorksWithPredefinedClassNames() { $view = new View(); $view->setHelperPath(__DIR__ . '/_stubs/HelperDir2'); try { $view->setHelperPath(__DIR__ . '/_stubs/HelperDir1', null); $this->fail('Exception for empty prefix was expected.'); } catch (\Exception $e) { $this->assertContains('only takes strings', $e->getMessage()); } try { $view->setHelperPath(__DIR__ . '/_stubs/HelperDir1', null); $this->fail('Exception for empty prefix was expected.'); } catch (\Exception $e) { $this->assertContains('only takes strings', $e->getMessage()); } try { $helper = $view->getHelper('Datetime'); } catch (\Exception $e) { $this->assertContains('not found', $e->getMessage()); } }