Skip to content

Commit 5693507

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-44106' into BugFestW4
2 parents c200b76 + 164bb99 commit 5693507

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

app/code/Magento/Catalog/Setup/UpgradeData.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
139139
'Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection'
140140
);
141141
}
142+
143+
if (version_compare($context->getVersion(), '2.0.3') < 0) {
144+
/** @var \Magento\Catalog\Setup\CategorySetup $categorySetup */
145+
$categorySetup = $this->categorySetupFactory->create(['setup' => $setup]);
146+
$categorySetup->updateAttribute(3, 51, 'default_value', 1);
147+
}
142148
$setup->endSetup();
143149
}
144150
}

app/code/Magento/Catalog/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_Catalog" setup_version="2.0.2">
9+
<module name="Magento_Catalog" setup_version="2.0.3">
1010
<sequence>
1111
<module name="Magento_Eav"/>
1212
<module name="Magento_Cms"/>

dev/tests/integration/testsuite/Magento/Catalog/Controller/CategoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getViewActionDataProvider()
2525
return [
2626
'category without children' => [
2727
'categoryId' => 5,
28-
['catalog_category_view_type_default', 'catalog_category_view_type_default_without_children'],
28+
['catalog_category_view_type_layered', 'catalog_category_view_type_layered_without_children'],
2929
[
3030
'%acategorypath-category-1-category-1-1-category-1-1-1%a',
3131
'%acategory-category-1-1-1%a',

dev/tests/integration/testsuite/Magento/Catalog/Model/CategoryTreeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public function testGetLevel()
161161
public function testGetAnchorsAbove()
162162
{
163163
$this->_model->load(4);
164-
$this->assertEmpty($this->_model->getAnchorsAbove());
164+
$this->assertContains(3, $this->_model->getAnchorsAbove());
165165
$this->_model->load(5);
166166
$this->assertContains(4, $this->_model->getAnchorsAbove());
167167
}

dev/tests/integration/testsuite/Magento/Catalog/Model/Indexer/Category/ProductTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function testReindexAll()
7373
$this->assertTrue((bool)$this->productResource->canBeShowInCategory($product, $categoryId));
7474
}
7575

76-
$this->assertFalse(
76+
$this->assertTrue(
7777
(bool)$this->productResource->canBeShowInCategory($product, $categoryThird->getParentId())
7878
);
7979
}
@@ -187,12 +187,12 @@ public function testCategoryCreate()
187187
$productThird->setCategoryIds([$categorySixth->getId()]);
188188
$productThird->save();
189189

190-
$categories = [self::DEFAULT_ROOT_CATEGORY, $categorySixth->getId()];
190+
$categories = [self::DEFAULT_ROOT_CATEGORY, $categorySixth->getId(), $categoryFifth->getId()];
191191
foreach ($categories as $categoryId) {
192192
$this->assertTrue((bool)$this->productResource->canBeShowInCategory($productThird, $categoryId));
193193
}
194194

195-
$categories = [$categoryFifth->getId(), $categorySecond->getId()];
195+
$categories = [$categorySecond->getId()];
196196
foreach ($categories as $categoryId) {
197197
$this->assertFalse((bool)$this->productResource->canBeShowInCategory($productThird, $categoryId));
198198
}

dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/CategoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,6 @@ public function testGetItems(\Magento\Catalog\Model\Layer\Filter\Category $model
109109
$this->assertSame($modelApplied, $item->getFilter());
110110
$this->assertEquals('Category 1.1', $item->getLabel());
111111
$this->assertEquals(4, $item->getValue());
112-
$this->assertEquals(1, $item->getCount());
112+
$this->assertEquals(2, $item->getCount());
113113
}
114114
}

0 commit comments

Comments
 (0)