protected function setUp()
{
$this->mockObjectManager = $this->createMock(ObjectManagerInterface::class);
$this->mockObjectManager->expects($this->any())->method('isRegistered')->will($this->returnCallback(array($this, 'objectManagerIsRegisteredCallback')));
$this->parser = $this->getAccessibleMock(Parser::class, array('dummy'));
$this->parser->_set('objectManager', $this->mockObjectManager);
}