public function testSetRoleThrowsExceptionWhenGivenAnArbitraryObject() { try { $this->_helper->setRole(new \stdClass()); $this->fail('An invalid argument was given, but a ' . 'Zend_View_Exception was not thrown'); } catch (View\Exception\ExceptionInterface $e) { $this->assertContains('$role must be a string', $e->getMessage()); } }