public function testSettingDefaultHomeDirectoryWithInvalidInfos() { $h = new h\Hyphenator(); try { $h->setHomePath('foo'); $this->fail('No Exception thrown'); } catch (\Exception $e) { $this->assertInstanceof('\\Org\\Heigl\\Hyphenator\\Exception\\PathNotFoundException', $e); } try { $h->setHomePath(__FILE__); $this->fail('No Exception thrown'); } catch (\Exception $e) { $this->assertInstanceof('\\Org\\Heigl\\Hyphenator\\Exception\\PathNotDirException', $e); } try { \Org\Heigl\Hyphenator\Hyphenator::setDefaultHomePath('foo'); $this->fail('No Exception thrown'); } catch (\Exception $e) { $this->assertInstanceof('\\Org\\Heigl\\Hyphenator\\Exception\\PathNotFoundException', $e); } try { \Org\Heigl\Hyphenator\Hyphenator::setDefaultHomePath(__FILE__); $this->fail('No Exception thrown'); } catch (\Exception $e) { $this->assertInstanceof('\\Org\\Heigl\\Hyphenator\\Exception\\PathNotDirException', $e); } }