BuildHooksConfigEntityTest.php in Build Hooks 3.x
File
tests/src/Kernel/BuildHooksConfigEntityTest.php
View source
<?php
namespace Drupal\Tests\build_hooks\Kernel;
use Drupal\build_hooks\TriggerInterface;
class BuildHooksConfigEntityTest extends BuildHooksKernelTestBase {
public function testFrontendEnvironment(string $deployment_strategy = TriggerInterface::DEPLOYMENT_STRATEGY_ENTITYSAVE) {
$this
->assertFrontendEnvironmentBuildHook('build_hooks_test', $deployment_strategy, 'http://example.com?whiz=bar', [
'whiz' => 'bar',
]);
}
public function providerFrontendEnvironment() {
return [
'Entity save' => [],
'Cron' => [
TriggerInterface::DEPLOYMENT_STRATEGY_CRON,
],
'Manual' => [
TriggerInterface::DEPLOYMENT_STRATEGY_MANUAL,
],
];
}
}