X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Ftests%2FBatchTest.php;fp=vendor%2Fdrush%2Fdrush%2Ftests%2FBatchTest.php;h=ba4a52308cbd10ff2eccf28764644af3034ea6df;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=0000000000000000000000000000000000000000;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/drush/drush/tests/BatchTest.php b/vendor/drush/drush/tests/BatchTest.php new file mode 100644 index 000000000..ba4a52308 --- /dev/null +++ b/vendor/drush/drush/tests/BatchTest.php @@ -0,0 +1,30 @@ +setUpDrupal(1, true); + $options = [ + 'include' => __DIR__, + ]; + $this->drush('unit-batch', [], $options); + // Collect log messages that begin with "!!!" (@see: _drushUnitBatchOperation()) + $parsed = $this->parseBackendOutput($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'); + } +}