11 use PHPUnit_Framework_MockObject_MockObject as MockObject;
23 private $productMetadata;
40 $this->productMetadata = $this->getMockBuilder(ProductMetadataInterface::class)
41 ->disableOriginalConstructor()
43 $this->config = $this->getMockBuilder(Config::class)
44 ->disableOriginalConstructor()
59 $this->config->method(
'getValue')
60 ->with(self::equalTo(
'channel'))
63 $this->productMetadata->method(
'getEdition')
66 self::assertEquals($expected, $this->builder->build($buildSubject));
74 $channel =
'Magento2_Cart_ConfigEdition_BT';
76 $this->config->method(
'getValue')
77 ->with(self::equalTo(
'channel'))
78 ->willReturn($channel);
80 $this->productMetadata->expects(self::never())
81 ->method(
'getEdition');
87 $this->builder->build([])
98 [
'FirstEdition', [
'channel' =>
'Magento2_Cart_FirstEdition_BT']],
99 [
'SecondEdition', [
'channel' =>
'Magento2_Cart_SecondEdition_BT']],
foreach(array_keys($composerData['require']) as $requiredPackage) if(empty($edition)) if(!empty($opts['edition'])) $edition
testBuild($edition, array $expected)
testBuildWithChannelFromConfig()