SocialTest.php in Open Social 8.6
File
src/Tests/SocialTest.php
View source
<?php
namespace Drupal\social\Tests;
use Drupal\simpletest\WebTestBase;
class SocialTest extends WebTestBase {
protected $profile = 'social';
public function testSocial() {
$this
->drupalGet('');
$this
->assertLink(t('Create new account'));
$this
->assertResponse(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
->assertText('No pending updates.');
$this
->assertFalse($this->container
->get('entity.definition_update_manager')
->needsUpdates(), 'After installation, entity schema is up to date.');
}
}
Classes
Name |
Description |
SocialTest |
Tests Social installation profile expectations. |