8 use \Magento\Framework\View\Design\Fallback\Rule\ModularSwitch;
29 $this->ruleNonModular = $this->getMockForAbstractClass(
30 \
Magento\Framework\View\Design\Fallback\Rule\RuleInterface::class
32 $this->ruleModular = $this->getMockForAbstractClass(
33 \
Magento\Framework\View\Design\Fallback\Rule\RuleInterface::class
35 $this->
object =
new ModularSwitch($this->ruleNonModular, $this->ruleModular);
41 $this->ruleNonModular =
null;
42 $this->ruleModular =
null;
47 $inputParams = [
'param_one' =>
'value_one',
'param_two' =>
'value_two'];
48 $expectedResult = new \stdClass();
49 $this->ruleNonModular->expects(
56 $this->returnValue($expectedResult)
59 $this->ruleModular->expects($this->never())->method(
'getPatternDirs');
61 $this->assertSame($expectedResult, $this->object->getPatternDirs($inputParams));
66 $inputParams = [
'param' =>
'value',
'module_name' =>
'Magento_Core'];
67 $expectedResult = new \stdClass();
68 $this->ruleNonModular->expects($this->never())->method(
'getPatternDirs');
70 $this->ruleModular->expects(
77 $this->returnValue($expectedResult)
80 $this->assertSame($expectedResult, $this->object->getPatternDirs($inputParams));
testGetPatternDirsNonModular()
testGetPatternDirsModular()