Skip to content
Snippets Groups Projects
Commit ee469ef5 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

Issue #3042743 by Gábor Hojtsy: Followup test updates for Drupal 9 support

parent 45962bd3
Branches
Tags
No related merge requests found
......@@ -41,13 +41,13 @@ class PhpConditionTest extends KernelTestBase {
// Grab the PHP condition and configure it to check against a php snippet.
$condition = $this->manager->createInstance('php')
->setConfig('php', '<?php return TRUE; ?>');
$this->assertTrue($condition->execute(), 'PHP condition passes as expected.');
$this->assertTrue((bool) $condition->execute(), 'PHP condition passes as expected.');
// Check for the proper summary.
self::assertEquals($condition->summary(), 'When the given PHP evaluates as TRUE.');
// Set the PHP snippet to return FALSE.
$condition->setConfig('php', '<?php return FALSE; ?>');
$this->assertFalse($condition->execute(), 'PHP condition fails as expected.');
$this->assertFalse((bool) $condition->execute(), 'PHP condition fails as expected.');
// Negate the condition.
$condition->setConfig('negate', TRUE);
......
<?php
namespace Drupal\php\Tests;
namespace Drupal\Tests\php\Functional;
/**
* Tests to make sure access to the PHP filter is properly restricted.
......
<?php
namespace Drupal\php\Tests;
namespace Drupal\Tests\php\Functional;
/**
* Tests to make sure the PHP filter actually evaluates PHP code when used.
......
<?php
namespace Drupal\php\Tests;
namespace Drupal\Tests\php\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
use Drupal\user\RoleInterface;
/**
......@@ -10,7 +10,7 @@ use Drupal\user\RoleInterface;
*
* @group PHP
*/
abstract class PhpTestBase extends WebTestBase {
abstract class PhpTestBase extends BrowserTestBase {
/**
* Modules to enable.
......
<?php
namespace Drupal\php\Tests;
namespace Drupal\Tests\php\Functional;
use Drupal\simpletest\WebTestBase;
use Drupal\Tests\BrowserTestBase;
/**
* Test uninstall functionality of PHP module.
*
* @group PHP
*/
class PhpUninstallTest extends WebTestBase {
class PhpUninstallTest extends BrowserTestBase {
/**
* Modules to enable.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment