diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php
index c675ed6..c7989cd 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php
@@ -84,7 +84,6 @@ public function render($empty = FALSE) {
     // Calculate the page totals.
     $current_page = (int) $this->view->getCurrentPage() + 1;
     $per_page = (int) $this->view->getItemsPerPage();
-    $count = count($this->view->result);
     // @TODO: Maybe use a possible is views empty functionality.
     // Not every view has total_rows set, use view->result instead.
     $total = isset($this->view->total_rows) ? $this->view->total_rows : count($this->view->result);
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
index 08c12cc..9486572 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php
@@ -854,7 +854,7 @@ public function buildOptionsForm(&$form, &$form_state) {
       $options[t('Fields')]["[{$this->options['id']}]"] = $this->label();
 
       $count = 0; // This lets us prepare the key as we want it printed.
-      foreach ($this->view->display_handler->getHandlers('argument') as $arg => $handler) {
+      foreach ($this->view->display_handler->getHandlers('argument') as $handler) {
         $options[t('Arguments')]['%' . ++$count] = t('@argument title', array('@argument' => $handler->adminLabel()));
         $options[t('Arguments')]['!' . $count] = t('@argument input', array('@argument' => $handler->adminLabel()));
       }
@@ -1469,17 +1469,17 @@ public function getRenderTokens($item) {
     if (!empty($this->view->build_info['substitutions'])) {
       $tokens = $this->view->build_info['substitutions'];
     }
-    $count = 0;
-    foreach ($this->view->display_handler->getHandlers('argument') as $arg => $handler) {
-      $token = '%' . ++$count;
-      if (!isset($tokens[$token])) {
-        $tokens[$token] = '';
+
+    // Add tokens for every argument (contextual filter) and path arg.
+    for ($count = 1; $count <= count($this->view->display_handler->getHandlers('argument')); $count++) {
+      if (!isset($tokens["%$count"])) {
+        $tokens["%$count"] = '';
       }
 
       // Use strip tags as there should never be HTML in the path.
       // However, we need to preserve special characters like " that
-      // were removed by String::checkPlain().
-      $tokens['!' . $count] = isset($this->view->args[$count - 1]) ? strip_tags(decode_entities($this->view->args[$count - 1])) : '';
+      // were removed by check_plain().
+      $tokens["!$count"] = isset($this->view->args[$count - 1]) ? strip_tags(decode_entities($this->view->args[$count - 1])) : '';
     }
 
     // Get flattened set of tokens for any array depth in query parameters.
diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldWebTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldWebTest.php
index dc9e3e8..ee09004 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Handler/FieldWebTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FieldWebTest.php
@@ -177,7 +177,7 @@ protected function xpathContent($content, $xpath, array $arguments = array()) {
    * Tests rewriting the output to a link.
    */
   public function testAlterUrl() {
-    $view = Views::getView('test_view');
+    $view = \Drupal\views\Views::getView('test_view');
     $view->setDisplay();
     $view->initHandlers();
     $this->executeView($view);
@@ -206,8 +206,6 @@ public function testAlterUrl() {
 
     foreach (array(FALSE, TRUE) as $absolute) {
       // Get the expected start of the path string.
-      $base = ($absolute ? $base_url . '/' : base_path()) . $script_path;
-      $absolute_string = $absolute ? 'absolute' : NULL;
       $alter = &$id_field->options['alter'];
       $alter['path'] = 'node/123';
 
@@ -234,8 +232,9 @@ public function testAlterUrl() {
       $expected_result = url('node/123', array('query' => array('foo' => NULL), 'fragment' => 'bar', 'absolute' => $absolute));
       $alter['path'] = 'node/123?foo#bar';
       $result = $id_field->theme($row);
-      // @fixme: The actual result is node/123?foo#bar so views has a bug here.
-      // $this->assertSubStringExists(decode_entities($result), decode_entities($expected_result));
+      // @todo The actual result is node/123?foo#bar so views has a bug here.
+      // @todo see https://drupal.org/node/1852492 and https://drupal.org/node/1342124
+      // $this->assertSubString(decode_entities($result), decode_entities($expected_result));
 
       $expected_result = url('<front>', array('absolute' => $absolute));
       $alter['path'] = '<front>';
diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTableUnitTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTableUnitTest.php
index c7d0345..80c7848 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTableUnitTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/StyleTableUnitTest.php
@@ -130,7 +130,6 @@ public function testTable() {
 
     // Excluded field to make sure its wrapping td doesn't show.
     $this->prepareView($view);
-    $style_plugin = $view->style_plugin;
     $view->field['name']->options['exclude'] = TRUE;
     $output = $view->preview();
     $output = drupal_render($output);
diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php
index af0341a..5ef0ebc 100644
--- a/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php
@@ -196,31 +196,6 @@ protected function displayMethodTests() {
     $this->enableModules(array('system'));
     $this->installSchema('system', 'url_alias');
 
-    $config['display'] = array(
-      'page_1' => array(
-        'display_options' => array('path' => 'test'),
-        'display_plugin' => 'page',
-        'id' => 'page_2',
-        'display_title' => 'Page 1',
-        'position' => 1
-      ),
-      'feed_1' => array(
-        'display_options' => array('path' => 'test.xml'),
-        'display_plugin' => 'feed',
-        'id' => 'feed',
-        'display_title' => 'Feed',
-        'position' => 2
-      ),
-      'page_2' => array(
-        'display_options' => array('path' => 'test/%/extra'),
-        'display_plugin' => 'page',
-        'id' => 'page_2',
-        'display_title' => 'Page 2',
-        'position' => 3
-      )
-    );
-    $view = $this->controller->create($config);
-
     // Tests Drupal\views\Entity\View::addDisplay()
     $view = $this->controller->create(array());
     $random_title = $this->randomName();
