public function testAssignThrowsExceptionsOnBadValues() { $view = new View(); try { $view->assign('_path', __DIR__ . '/_stubs/HelperDir2/'); $this->fail('Protected/private properties cannot be assigned'); } catch (\Exception $e) { // success // @todo assert something? } try { $view->assign(array('_path' => __DIR__ . '/_stubs/HelperDir2/')); $this->fail('Protected/private properties cannot be assigned'); } catch (\Exception $e) { // success // @todo assert something? } try { $view->assign($this); $this->fail('Assign spec requires string or array'); } catch (\Exception $e) { // success // @todo assert something? } }