public function testInternalTriggerExceptionThrowRuntimeException() { $this->_storage = $this->getMockForAbstractAdapter(); $plugin = new \ZendTest\Cache\Storage\TestAsset\MockPlugin(); $this->_storage->addPlugin($plugin); $result = null; $params = new \ArrayObject(array('key' => 'key1', 'value' => 'value1')); // call protected method $method = new \ReflectionMethod(get_class($this->_storage), 'triggerException'); $method->setAccessible(true); $this->setExpectedException('Zend\\Cache\\Exception\\RuntimeException', 'test'); $method->invokeArgs($this->_storage, array('setItem', $params, &$result, new Exception\RuntimeException('test'))); }