Skip to content
Snippets Groups Projects
Commit 2e4505c6 authored by Dan Feidt's avatar Dan Feidt Committed by Dan Feidt
Browse files

Issue #3131928 by HongPong: Update CI testing. Added two functional tests for...

Issue #3131928 by HongPong: Update CI testing. Added two functional tests for turning on wordpress_migrate and wordpress_migrate_ui, added drupalci.yml
parent 31fdfafe
No related branches found
No related tags found
No related merge requests found
<?php
declare(strict_types = 1);
namespace Drupal\Tests\wordpress_migrate\Functional;
use Drupal\Core\Url;
use Drupal\Tests\BrowserTestBase;
/**
* Simple test to ensure that main page loads with module enabled.
*
* @group wordpress_migrate
*/
final class LoadWordpressMigrateTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'wordpress_migrate',
'migrate_plus',
'ctools'
];
/**
* A user with permission to administer site configuration.
*
* @var \Drupal\user\UserInterface
*/
protected $user;
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'claro';
/**
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
$this->user = $this->drupalCreateUser(['administer site configuration']);
$this->drupalLogin($this->user);
}
/**
* Tests that the home page loads with a 200 response.
*/
public function testLoad(): void {
$this->drupalGet(Url::fromRoute('<front>'));
$this->assertSession()->statusCodeEquals(200);
}
}
<?php
declare(strict_types = 1);
namespace Drupal\Tests\wordpress_migrate\Functional;
use Drupal\Core\Url;
use Drupal\Tests\BrowserTestBase;
/**
* Simple test to ensure that main page loads with module enabled.
*
* @group wordpress_migrate
*/
final class LoadWordpressMigrateUITest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'wordpress_migrate',
'wordpress_migrate_ui',
'migrate_plus',
'ctools'
];
/**
* A user with permission to administer site configuration.
*
* @var \Drupal\user\UserInterface
*/
protected $user;
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'claro';
/**
* {@inheritdoc}
*/
protected function setUp(): void {
parent::setUp();
$this->user = $this->drupalCreateUser(['administer site configuration']);
$this->drupalLogin($this->user);
}
/**
* Tests that the home page loads with a 200 response.
*/
public function testLoad(): void {
$this->drupalGet(Url::fromRoute('<front>'));
$this->assertSession()->statusCodeEquals(200);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment