/** * Tests that a Nimbles\Core\Collection\Exception\ReadOnly exception is thrown when * added a cookie to a read only jar * @return void */ public function testReadOnly() { $jar = new Cookie\Jar(array('test' => new Cookie(), 'test2' => 'value'), array('readonly' => true)); $this->assertTrue($jar->isReadOnly()); $this->setExpectedException('Nimbles\\Core\\Collection\\Exception\\ReadOnly'); $jar['test3'] = 'value3'; }