public function testClearWhenStorageMarkedImmutableRaisesException() { $this->storage->foo = 'bar'; $this->storage->bar = 'baz'; $this->storage->markImmutable(); $this->setExpectedException('Zend\\Session\\Exception\\RuntimeException', 'Cannot clear storage as it is marked immutable'); $this->storage->clear(); }