20 private $dataInterfaceMock;
25 private $objectManagerHelper;
37 $this->dataInterfaceMock = $this->getMockBuilder(DataInterface::class)
38 ->disableOriginalConstructor()
41 $this->objectManagerHelper =
new ObjectManagerHelper($this);
43 $this->config = $this->objectManagerHelper->getObject(
46 'data' => $this->dataInterfaceMock,
57 $defaultValue =
'mock';
58 $configValue =
'emptyString';
60 $this->dataInterfaceMock
61 ->expects($this->once())
63 ->with($key, $defaultValue)
64 ->willReturn($configValue);
66 $this->assertSame($configValue, $this->config->get($key, $defaultValue));