You are here

class TestViewsBulkOperationsBatch in Views Bulk Operations (VBO) 8.3

Same name and namespace in other branches
  1. 8 tests/src/Unit/TestViewsBulkOperationsBatch.php \Drupal\Tests\views_bulk_operations\Unit\TestViewsBulkOperationsBatch
  2. 8.2 tests/src/Unit/TestViewsBulkOperationsBatch.php \Drupal\Tests\views_bulk_operations\Unit\TestViewsBulkOperationsBatch
  3. 4.0.x tests/src/Unit/TestViewsBulkOperationsBatch.php \Drupal\Tests\views_bulk_operations\Unit\TestViewsBulkOperationsBatch

Override some class methods for proper testing.

Hierarchy

Expanded class hierarchy of TestViewsBulkOperationsBatch

File

tests/src/Unit/TestViewsBulkOperationsBatch.php, line 10

Namespace

Drupal\Tests\views_bulk_operations\Unit
View source
class TestViewsBulkOperationsBatch extends ViewsBulkOperationsBatch {

  /**
   * Override t method.
   */
  public static function translate($string, array $args = [], array $options = []) {
    return strtr($string, $args);
  }

  /**
   * Override message method.
   */
  public static function message($message = NULL, $type = 'status', $repeat = TRUE) {
    static $storage;
    if (isset($storage)) {
      $output = $storage;
      $storage = NULL;
      return $output;
    }
    else {
      $storage = (string) $message;
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TestViewsBulkOperationsBatch::message public static function Override message method. Overrides ViewsBulkOperationsActionCompletedTrait::message
TestViewsBulkOperationsBatch::translate public static function Override t method. Overrides ViewsBulkOperationsActionCompletedTrait::translate
ViewsBulkOperationsActionCompletedTrait::finished public static function Batch finished callback. 1
ViewsBulkOperationsBatch::getBatch public static function Batch builder function.
ViewsBulkOperationsBatch::getList public static function Gets the list of entities to process.
ViewsBulkOperationsBatch::operation public static function Batch operation callback.
ViewsBulkOperationsBatch::saveList public static function Save generated list to user tempstore.