MinimalTest.php in Zircon Profile 8.0
Same filename and directory in other branches
Contains \Drupal\minimal\Tests\MinimalTest.
Namespace
Drupal\minimal\TestsFile
core/profiles/minimal/src/Tests/MinimalTest.phpView source
<?php
/**
* @file
* Contains \Drupal\minimal\Tests\MinimalTest.
*/
namespace Drupal\minimal\Tests;
use Drupal\simpletest\WebTestBase;
/**
* Tests Minimal installation profile expectations.
*
* @group minimal
*/
class MinimalTest extends WebTestBase {
protected $profile = 'minimal';
/**
* Tests Minimal installation profile.
*/
function testMinimal() {
$this
->drupalGet('');
// Check the login block is present.
$this
->assertLink(t('Create new account'));
$this
->assertResponse(200);
// Create a user to test tools and navigation blocks for logged in users
// with appropriate permissions.
$user = $this
->drupalCreateUser(array(
'access administration pages',
'administer content types',
));
$this
->drupalLogin($user);
$this
->drupalGet('');
$this
->assertText(t('Tools'));
$this
->assertText(t('Administration'));
// Ensure that there are no pending updates after installation.
$this
->drupalLogin($this->rootUser);
$this
->drupalGet('update.php/selection');
$this
->assertText('No pending updates.');
// Ensure that there are no pending entity updates after installation.
$this
->assertFalse($this->container
->get('entity.definition_update_manager')
->needsUpdates(), 'After installation, entity schema is up to date.');
}
}
Classes
Name | Description |
---|---|
MinimalTest | Tests Minimal installation profile expectations. |