function ComposerHookTest::testScaffoldEvents

Same name in other branches
  1. 10 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php \Drupal\Tests\Composer\Plugin\Scaffold\Functional\ComposerHookTest::testScaffoldEvents()

Tests to see if scaffold events are dispatched and picked up by the plugin.

File

core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Functional/ComposerHookTest.php, line 155

Class

ComposerHookTest
Tests Composer Hooks that run scaffold operations.

Namespace

Drupal\Tests\Composer\Plugin\Scaffold\Functional

Code

public function testScaffoldEvents() : void {
    $topLevelProjectDir = 'scaffold-events-fixture';
    $sut = $this->fixturesDir . '/' . $topLevelProjectDir;
    $output = $this->mustExec("composer install --no-ansi", $sut);
    $this->assertStringContainsString('Hello preDrupalScaffoldCmd', $output);
    $this->assertStringContainsString('Hello postDrupalScaffoldCmd', $output);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.