13 use PHPUnit_Framework_MockObject_MockObject as MockObject;
25 private $sourceTwoMock;
30 private $excludeListMock;
35 private $typePoolMock;
40 private $objectManagerHelper;
49 $this->objectManagerHelper =
new ObjectManagerHelper($this);
50 $this->sourceMock = $this->getMockBuilder(ConfigSourceInterface::class)
51 ->getMockForAbstractClass();
52 $this->sourceTwoMock = $this->getMockBuilder(ConfigSourceInterface::class)
53 ->getMockForAbstractClass();
54 $this->excludeListMock = $this->getMockBuilder(ExcludeList::class)
55 ->disableOriginalConstructor()
57 $this->typePoolMock = $this->getMockBuilder(TypePool::class)
58 ->disableOriginalConstructor()
61 $this->sourceMock->expects($this->once())
67 'unsecure' => [
'without_type' =>
'some_value'],
68 'secure' => [
'environment_type' =>
'some_environment_value'],
70 'without_type' =>
'some_value',
71 'sensitive_type' =>
'some_sensitive_value' 78 'test2' => [
'without_type' => 5]
84 $this->sourceTwoMock->expects($this->once())
90 'another_key' => [
'sensitive_type' =>
'some_sensitive_value']
95 $this->typePoolMock->expects($this->any())
107 $this->excludeListMock,
110 'source' => $this->sourceTwoMock,
114 'source' => $this->sourceMock,
121 'default' =>
'include',
122 'sensitive' =>
'exclude',
123 'environment' =>
'exclude',
135 'test2' => [
'without_type' => 5]
142 'without_type' =>
'some_value',
145 'without_type' =>
'some_value',
150 $this->model->get(
'')
156 $this->objectManagerHelper->setBackwardCompatibleProperty(
160 'default' =>
'exclude',
161 'sensitive' =>
'include',
162 'environment' =>
'include',
170 'secure' => [
'environment_type' =>
'some_environment_value'],
172 'sensitive_type' =>
'some_sensitive_value' 174 'another_key' => [
'sensitive_type' =>
'some_sensitive_value']
178 $this->model->get(
'')
186 'web/secure/environment_type',
187 'web/some_key/sensitive_type',
188 'web/another_key/sensitive_type' 190 $this->model->getExcludedFields()
testGetWithExcludeDefault()