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