You are here

public function UnitTest::testAcsfEventInterrupt in Acquia Cloud Site Factory Connector 8

Same name and namespace in other branches
  1. 8.2 tests/AcsfEventsTest.php \UnitTest::testAcsfEventInterrupt()

Tests that the events system handles interrupts correctly.

File

tests/AcsfEventsTest.php, line 97
Provides PHPUnit tests for the Acsf Events system.

Class

UnitTest

Code

public function testAcsfEventInterrupt() {
  $registry = acsf_get_registry(TRUE);
  $event = new AcsfEvent(new AcsfEventDispatcher(), new AcsfLog(), 'unit_test', $registry, []);
  $event
    ->run();
  $debug = $event
    ->debug();
  $this
    ->assertCount(1, $debug['handlers']['incomplete']);
  $this
    ->assertCount(3, $debug['handlers']['complete']);
}