b87b33139f957d05fa108291d4564f521f0e4fcf
[yaffs-website] / web / core / profiles / minimal / tests / src / Functional / MinimalTest.php
1 <?php
2
3 namespace Drupal\Tests\minimal\Functional;
4
5 use Drupal\Tests\BrowserTestBase;
6
7 /**
8  * Tests Minimal installation profile expectations.
9  *
10  * @group minimal
11  */
12 class MinimalTest extends BrowserTestBase {
13
14   protected $profile = 'minimal';
15
16   /**
17    * Tests Minimal installation profile.
18    */
19   public function testMinimal() {
20     $this->drupalGet('');
21     // Check the login block is present.
22     $this->assertLink(t('Create new account'));
23     $this->assertResponse(200);
24
25     // Create a user to test tools and navigation blocks for logged in users
26     // with appropriate permissions.
27     $user = $this->drupalCreateUser(['access administration pages', 'administer content types']);
28     $this->drupalLogin($user);
29     $this->drupalGet('');
30     $this->assertText(t('Tools'));
31     $this->assertText(t('Administration'));
32
33     // Ensure that there are no pending updates after installation.
34     $this->drupalLogin($this->rootUser);
35     $this->drupalGet('update.php/selection');
36     $this->assertText('No pending updates.');
37
38     // Ensure that there are no pending entity updates after installation.
39     $this->assertFalse($this->container->get('entity.definition_update_manager')->needsUpdates(), 'After installation, entity schema is up to date.');
40
41     // Ensure special configuration overrides are correct.
42     $this->assertFalse($this->config('system.theme.global')->get('features.node_user_picture'), 'Configuration system.theme.global:features.node_user_picture is FALSE.');
43     $this->assertEquals(USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL, $this->config('user.settings')->get('register'));
44   }
45
46 }