public function UpdateManagerTest::testGetTasks in Lightning Core 8.4
Same name in this branch
- 8.4 tests/src/Unit/UpdateManagerTest.php \Drupal\Tests\lightning_core\Unit\UpdateManagerTest::testGetTasks()
- 8.4 tests/src/Kernel/UpdateManagerTest.php \Drupal\Tests\lightning_core\Kernel\UpdateManagerTest::testGetTasks()
Same name and namespace in other branches
- 8.5 tests/src/Kernel/UpdateManagerTest.php \Drupal\Tests\lightning_core\Kernel\UpdateManagerTest::testGetTasks()
@covers ::getTasks
File
- tests/
src/ Kernel/ UpdateManagerTest.php, line 92
Class
- UpdateManagerTest
- @coversDefaultClass \Drupal\lightning_core\UpdateManager
Namespace
Drupal\Tests\lightning_core\KernelCode
public function testGetTasks() {
$handler = new TestUpdate();
$this
->assertFalse($handler->invoked);
$tasks = $this->updateManager
->getTasks($handler);
$this
->assertInstanceOf('Generator', $tasks);
$this
->assertTrue($tasks
->valid());
$this
->assertInstanceOf('\\Drupal\\lightning_core\\UpdateTask', $tasks
->current());
$tasks
->current()
->execute($this
->prophesize('\\Symfony\\Component\\Console\\Style\\StyleInterface')
->reveal(), TRUE);
$this
->assertTrue($handler->invoked);
}