configPulltest.php

  1. 8.0.x tests/configPulltest.php
  2. master tests/configPulltest.php

Namespace

Unish

Classes

Namesort descending Description
ConfigPullCase Tests for config-pull command. Sets up two Drupal sites. @group commands @group slow @group config

File

tests/configPulltest.php
View source
  1. <?php
  2. namespace Unish;
  3. /**
  4. * Tests for config-pull command. Sets up two Drupal sites.
  5. * @group commands
  6. * @group slow
  7. * @group config
  8. */
  9. class ConfigPullCase extends CommandUnishTestCase {
  10. function setUp() {
  11. if (UNISH_DRUPAL_MAJOR_VERSION < 8) {
  12. $this->markTestSkipped('Config only available on D8+.');
  13. }
  14. $this->setUpDrupal(2, TRUE);
  15. }
  16. /*
  17. * Make sure a change propogates using config-pull+config-import.
  18. */
  19. function testConfigPull() {
  20. list($source, $destination) = array_keys($this->getSites());
  21. $source = "@$source";
  22. $destination = "@$destination";
  23. $this->drush('config-set', array('system.site', 'name', 'testConfigPull'), array('yes' => NULL), $source);
  24. $this->drush('config-pull', array($source, $destination), array());
  25. $this->drush('config-import', array(), array(), $destination);
  26. $this->drush('config-get', array('system.site', 'name'), array(), $source);
  27. $this->assertEquals("'system.site:name': testConfigPull", $this->getOutput(), 'Config was successfully pulled.');
  28. }
  29. }