public function ViewsBulkOperationsBatchTest::testFinished in Views Bulk Operations (VBO) 8
Same name and namespace in other branches
- 8.3 tests/src/Unit/ViewsBulkOperationsBatchTest.php \Drupal\Tests\views_bulk_operations\Unit\ViewsBulkOperationsBatchTest::testFinished()
- 8.2 tests/src/Unit/ViewsBulkOperationsBatchTest.php \Drupal\Tests\views_bulk_operations\Unit\ViewsBulkOperationsBatchTest::testFinished()
- 4.0.x tests/src/Unit/ViewsBulkOperationsBatchTest.php \Drupal\Tests\views_bulk_operations\Unit\ViewsBulkOperationsBatchTest::testFinished()
Tests the finished() method.
@covers ::finished
File
- tests/
src/ Unit/ ViewsBulkOperationsBatchTest.php, line 153
Class
- ViewsBulkOperationsBatchTest
- @coversDefaultClass \Drupal\views_bulk_operations\ViewsBulkOperationsBatch @group views_bulk_operations
Namespace
Drupal\Tests\views_bulk_operations\UnitCode
public function testFinished() {
$results = [
'operations' => [
'Some operation',
'Some operation',
],
];
TestViewsBulkOperationsBatch::finished(TRUE, $results, []);
$this
->assertEquals(TestViewsBulkOperationsBatch::message(), 'Action processing results: Some operation (2).');
$results = [
'operations' => [
'Some operation1',
'Some operation2',
],
];
TestViewsBulkOperationsBatch::finished(TRUE, $results, []);
$this
->assertEquals(TestViewsBulkOperationsBatch::message(), 'Action processing results: Some operation1 (1), Some operation2 (1).');
}