6 * Tests the drush batch subsystem.
8 * @see includes/batch.inc
12 class batchCase extends CommandUnishTestCase {
14 public function testBatch() {
15 $sites = $this->setUpDrupal(1, TRUE);
17 'root' => $this->webroot(),
20 'include' => dirname(__FILE__),
22 $this->drush('unit-batch', array(), $options);
23 // Collect log messages that begin with "!!!" (@see: _drush_unit_batch_operation())
24 $parsed = $this->parse_backend_output($this->getOutput());
25 $special_log_msgs = '';
26 foreach ($parsed['log'] as $key => $log) {
27 if(substr($log['message'],0,3) == '!!!') {
28 $special_log_msgs .= $log['message'];
31 $this->assertEquals("!!! ArrayObject does its job.", $special_log_msgs, 'Batch messages were logged');