Commit 1c9d1062 authored by alexpott's avatar alexpott

Issue #2072597 by stevepurkiss, giffenk, legolasbo, bogdan khrupa,...

Issue #2072597 by stevepurkiss, giffenk, legolasbo, bogdan khrupa, er.pushpinderrana, connorwk, damiankloip, amitgoyal, martin107, joshi.rohit100, jgeryk, jvranckx, stuti.manandhar, tkuldeep17, anish.a: Remove Unused local variables from tests in the Views module
parent f801536d
......@@ -41,6 +41,7 @@ function testDefaultRowClasses() {
$class = (string) $attributes['class'][0];
$this->assertTrue(strpos($class, 'views-row') !== FALSE, 'Make sure that the views row class is set right.');
}
$this->assertIdentical($count, $count_result);
}
}
......@@ -64,7 +64,7 @@ protected function setUp() {
* @covers ::routeRebuildFinished
*/
public function testRouteRebuildFinished() {
list($view, $executable, $display_1, $display_2) = $this->setupMocks();
list($display_1, $display_2) = $this->setupMocks();
$display_1->expects($this->once())
->method('collectRoutes')
......@@ -95,7 +95,7 @@ public function testOnAlterRoutes() {
$route_event = new RouteBuildEvent($collection, 'views');
list($view, $executable, $display_1, $display_2) = $this->setupMocks();
list($display_1, $display_2) = $this->setupMocks();
// The page_1 display overrides an existing route, so the dynamicRoutes
// should only call the second display.
......@@ -139,9 +139,8 @@ public function testOnAlterRoutes() {
/**
* Sets up mocks of Views objects needed for testing.
*
* @return array
* An array of Views mocks, including the executable, the view entity, and
* two display plugins.
* @return array \Drupal\views\Plugin\views\display\DisplayRouterInterface[]|\PHPUnit_Framework_MockObject_MockObject[]
* An array of two mocked view displays
*/
protected function setupMocks() {
$executable = $this->getMockBuilder('Drupal\views\ViewExecutable')
......@@ -190,7 +189,7 @@ protected function setupMocks() {
$this->routeSubscriber->applicableViews[] = array('test_id', 'page_2');
$this->routeSubscriber->applicableViews[] = array('test_id', 'page_3');
return array($executable, $view, $display_1, $display_2);
return array($display_1, $display_2);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment