/** * @expectedException \Oro\Component\Layout\Exception\LogicException * @expectedExceptionMessage The item "test" cannot be removed because the context variables are already resolved. */ public function testRemoveExistingValueThrowsExceptionWhenDataAlreadyResolved() { $this->context->getResolver()->setOptional(['test']); $this->context->set('test', 'val'); $this->context->resolve(); $this->context->remove('test'); }
public function testArrayAccessExistsForContextData() { $name = 'foo'; $this->context->data()->set($name, 'foo_id', 'val'); $this->context->resolve(); $this->registry->expects($this->once())->method('findDataProvider')->with($name)->will($this->returnValue(null)); $this->assertTrue(isset($this->dataAccessor[$name])); }