Skip to content

Commit 3ffb775

Browse files
author
Sergey Semenov
committed
MAGETWO-58796: Add request parameter to CMS event observer
1 parent 5f3b695 commit 3ffb775

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

app/code/Magento/Cms/Controller/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function match(\Magento\Framework\App\RequestInterface $request)
9696
$condition = new \Magento\Framework\DataObject(['identifier' => $identifier, 'continue' => true]);
9797
$this->_eventManager->dispatch(
9898
'cms_controller_router_match_before',
99-
['router' => $this, 'condition' => $condition, 'request' => $request]
99+
['router' => $this, 'condition' => $condition]
100100
);
101101
$identifier = $condition->getIdentifier();
102102

app/code/Magento/Cms/Test/Unit/Controller/RouterTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
<?php
22
/**
3-
* Copyright © 2017 Magento. All rights reserved.
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
66
namespace Magento\Cms\Test\Unit\Controller;
77

8+
/**
9+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
10+
*/
811
class RouterTest extends \PHPUnit_Framework_TestCase
912
{
1013
/**
@@ -123,7 +126,6 @@ public function testMatchCmsControllerRouterMatchBeforeEventParams()
123126
[
124127
'router' => $this->router,
125128
'condition' => $condition,
126-
'request' => $requestMock,
127129
]
128130
)
129131
->willReturnSelf();

0 commit comments

Comments
 (0)