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'); } }