NetlifyBuildHooksTest.php in Build Hooks 3.x
File
modules/build_hooks_netlify/tests/src/Kernel/NetlifyBuildHooksTest.php
View source
<?php
namespace Drupal\Tests\build_hooks_netlify\Kernel;
use Drupal\build_hooks\TriggerInterface;
use Drupal\Tests\build_hooks\Kernel\BuildHooksKernelTestBase;
class NetlifyBuildHooksTest extends BuildHooksKernelTestBase {
protected static $modules = [
'build_hooks_netlify',
];
protected function setUp() {
parent::setUp();
$this
->installConfig('build_hooks_netlify');
}
public function testDefaultSettings() {
$this
->assertSame('', $this
->config('build_hooks_netlify.settings')
->get('netlify_api_key'));
}
public function testDeploymentHooks() {
$this
->assertFrontendEnvironmentBuildHook('netlify', TriggerInterface::DEPLOYMENT_STRATEGY_ENTITYSAVE, 'http://example.com?foo=bar', [
'build_hook_url' => 'http://example.com?foo=bar',
]);
}
}