Commit 9e7f7cd4 authored by catch's avatar catch

Issue #2864008 by nlisgo: Convert web tests to browser tests for content_moderation module

parent c8b4da18
<?php <?php
namespace Drupal\content_moderation\Tests; namespace Drupal\Tests\content_moderation\Functional;
/** /**
* Tests the moderation form, specifically on nodes. * Tests the moderation form, specifically on nodes.
...@@ -27,7 +27,7 @@ protected function setUp() { ...@@ -27,7 +27,7 @@ protected function setUp() {
* the default revision is not a published moderation state. * the default revision is not a published moderation state.
* *
* @see \Drupal\content_moderation\EntityOperations * @see \Drupal\content_moderation\EntityOperations
* @see \Drupal\content_moderation\Tests\ModerationStateBlockTest::testCustomBlockModeration * @see \Drupal\Tests\content_moderation\Functional\ModerationStateBlockTest::testCustomBlockModeration
*/ */
public function testModerationForm() { public function testModerationForm() {
// Create new moderated content in draft. // Create new moderated content in draft.
......
<?php <?php
namespace Drupal\content_moderation\Tests; namespace Drupal\Tests\content_moderation\Functional;
use Drupal\block_content\Entity\BlockContent; use Drupal\block_content\Entity\BlockContent;
use Drupal\block_content\Entity\BlockContentType; use Drupal\block_content\Entity\BlockContentType;
......
<?php <?php
namespace Drupal\content_moderation\Tests; namespace Drupal\Tests\content_moderation\Functional;
use Drupal\Core\Url; use Drupal\Core\Url;
use Drupal\node\Entity\Node; use Drupal\node\Entity\Node;
...@@ -132,7 +132,7 @@ public function testPagers() { ...@@ -132,7 +132,7 @@ public function testPagers() {
$this->drupalLogin($this->adminUser); $this->drupalLogin($this->adminUser);
$this->drupalGet('admin/content'); $this->drupalGet('admin/content');
$element = $this->cssSelect('nav.pager li.is-active a'); $element = $this->cssSelect('nav.pager li.is-active a');
$url = (string) $element[0]['href']; $url = $element[0]->getAttribute('href');
$query = []; $query = [];
parse_str(parse_url($url, PHP_URL_QUERY), $query); parse_str(parse_url($url, PHP_URL_QUERY), $query);
$this->assertEqual(0, $query['page']); $this->assertEqual(0, $query['page']);
......
<?php <?php
namespace Drupal\content_moderation\Tests; namespace Drupal\Tests\content_moderation\Functional;
/** /**
* Tests moderation state node type integration. * Tests moderation state node type integration.
......
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