MinimalTest.php in Drupal 8
File
core/profiles/minimal/tests/src/Functional/MinimalTest.php
View source
<?php
namespace Drupal\Tests\minimal\Functional;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\RequirementsPageTrait;
use Drupal\user\UserInterface;
class MinimalTest extends BrowserTestBase {
use RequirementsPageTrait;
protected $profile = 'minimal';
protected $defaultTheme = 'stark';
public function testMinimal() {
$this
->drupalGet('');
$this
->assertSession()
->linkExists(t('Create new account'));
$this
->assertSession()
->statusCodeEquals(200);
$user = $this
->drupalCreateUser([
'access administration pages',
'administer content types',
]);
$this
->drupalLogin($user);
$this
->drupalGet('');
$this
->assertText(t('Tools'));
$this
->assertText(t('Administration'));
$this
->drupalLogin($this->rootUser);
$this
->drupalGet('update.php/selection');
$this
->updateRequirementsProblem();
$this
->drupalGet('update.php/selection');
$this
->assertText('No pending updates.');
$this
->assertFalse($this->container
->get('entity.definition_update_manager')
->needsUpdates(), 'After installation, entity schema is up to date.');
$this
->assertFalse($this
->config('system.theme.global')
->get('features.node_user_picture'), 'Configuration system.theme.global:features.node_user_picture is FALSE.');
$this
->assertEquals(UserInterface::REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL, $this
->config('user.settings')
->get('register'));
}
}
Classes
Name |
Description |
MinimalTest |
Tests Minimal installation profile expectations. |