From 854eae36f99ec5b3530db9a0c80ee758733c3f1a Mon Sep 17 00:00:00 2001 From: nevvermind Date: Mon, 2 May 2016 10:56:09 +0100 Subject: [PATCH 1/2] Remove unused property + use ::class Closes https://github.com/magento/magento2/issues/2103 --- app/code/Magento/Catalog/Model/Layer/FilterList.php | 8 ++++---- app/code/Magento/LayeredNavigation/Block/Navigation.php | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Catalog/Model/Layer/FilterList.php b/app/code/Magento/Catalog/Model/Layer/FilterList.php index 3113bd687eafd..04179bc19c085 100644 --- a/app/code/Magento/Catalog/Model/Layer/FilterList.php +++ b/app/code/Magento/Catalog/Model/Layer/FilterList.php @@ -30,10 +30,10 @@ class FilterList * @var string[] */ protected $filterTypes = [ - self::CATEGORY_FILTER => 'Magento\Catalog\Model\Layer\Filter\Category', - self::ATTRIBUTE_FILTER => 'Magento\Catalog\Model\Layer\Filter\Attribute', - self::PRICE_FILTER => 'Magento\Catalog\Model\Layer\Filter\Price', - self::DECIMAL_FILTER => 'Magento\Catalog\Model\Layer\Filter\Decimal', + self::CATEGORY_FILTER => \Magento\Catalog\Model\Layer\Filter\Category::class, + self::ATTRIBUTE_FILTER => \Magento\Catalog\Model\Layer\Filter\Attribute::class, + self::PRICE_FILTER => \Magento\Catalog\Model\Layer\Filter\Price::class, + self::DECIMAL_FILTER => \Magento\Catalog\Model\Layer\Filter\Decimal::class, ]; /** diff --git a/app/code/Magento/LayeredNavigation/Block/Navigation.php b/app/code/Magento/LayeredNavigation/Block/Navigation.php index 6b886769c5ba3..1a7ef2598084e 100644 --- a/app/code/Magento/LayeredNavigation/Block/Navigation.php +++ b/app/code/Magento/LayeredNavigation/Block/Navigation.php @@ -59,7 +59,6 @@ public function __construct( */ protected function _prepareLayout() { - $this->renderer = $this->getChildBlock('renderer'); foreach ($this->filterList->getFilters($this->_catalogLayer) as $filter) { $filter->apply($this->getRequest()); } From 18f0ce291c58d605233647251fc20498ecdf7d8d Mon Sep 17 00:00:00 2001 From: nevvermind Date: Mon, 2 May 2016 11:53:10 +0100 Subject: [PATCH 2/2] Fix failing test (test was too explicit) --- .../LayeredNavigation/Test/Unit/Block/NavigationTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/code/Magento/LayeredNavigation/Test/Unit/Block/NavigationTest.php b/app/code/Magento/LayeredNavigation/Test/Unit/Block/NavigationTest.php index a5bf6c9d433df..dba2ddcc2caa3 100644 --- a/app/code/Magento/LayeredNavigation/Test/Unit/Block/NavigationTest.php +++ b/app/code/Magento/LayeredNavigation/Test/Unit/Block/NavigationTest.php @@ -71,8 +71,6 @@ public function testGetStateHtml() $stateHtml = 'I feel good'; $this->filterListMock->expects($this->any())->method('getFilters')->will($this->returnValue([])); $this->layoutMock->expects($this->at(0))->method('getChildName') - ->with(null, 'renderer'); - $this->layoutMock->expects($this->at(1))->method('getChildName') ->with(null, 'state') ->will($this->returnValue('state block'));