X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Ftests%2FbatchTest.php;fp=vendor%2Fdrush%2Fdrush%2Ftests%2FbatchTest.php;h=3db4d768f1ab063b88822bf97f6d707ab974fc62;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/drush/drush/tests/batchTest.php b/vendor/drush/drush/tests/batchTest.php new file mode 100644 index 000000000..3db4d768f --- /dev/null +++ b/vendor/drush/drush/tests/batchTest.php @@ -0,0 +1,33 @@ +setUpDrupal(1, TRUE); + $options = array( + 'root' => $this->webroot(), + 'uri' => key($sites), + 'yes' => NULL, + 'include' => dirname(__FILE__), + ); + $this->drush('unit-batch', array(), $options); + // Collect log messages that begin with "!!!" (@see: _drush_unit_batch_operation()) + $parsed = $this->parse_backend_output($this->getOutput()); + $special_log_msgs = ''; + foreach ($parsed['log'] as $key => $log) { + if(substr($log['message'],0,3) == '!!!') { + $special_log_msgs .= $log['message']; + } + } + $this->assertEquals("!!! ArrayObject does its job.", $special_log_msgs, 'Batch messages were logged'); + } +}