CircleCiUpdateTest.php in Build Hooks 8.2
Same filename and directory in other branches
File
modules/build_hooks_circleci/tests/src/Functional/CircleCiUpdateTest.phpView source
<?php
namespace Drupal\Tests\build_hooks_circleci\Functional;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
/**
* Defines a class for testing the update to the config entity.
*
* @group build_hooks
*/
class CircleCiUpdateTest extends UpdatePathTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../../tests/fixtures/update/d89-minimal-circleci-netlify.php.gz',
];
}
/**
* Tests circleci_update_8201().
*
* @see circleci_update_8201()
*/
public function testCircleConfigUpdate8201() {
$this
->assertTrue(\Drupal::service('config.storage')
->exists('build_hooks_circleci.circleCiConfig'));
$this
->assertFalse(\Drupal::service('config.storage')
->exists('build_hooks_circleci.settings'));
// Run updates.
$this
->runUpdates();
$this
->assertFalse(\Drupal::service('config.storage')
->exists('build_hooks_circleci.circleCiConfig'));
$this
->assertTrue(\Drupal::service('config.storage')
->exists('build_hooks_circleci.settings'));
}
}
Classes
Name | Description |
---|---|
CircleCiUpdateTest | Defines a class for testing the update to the config entity. |