-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
68 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "drupal/turnstile_protect", | ||
"description": "Put your site routes behind a Cloudflare Turnstile", | ||
"type": "drupal-module", | ||
"license": "GPL-2.0+", | ||
"homepage": "https://www.drupal.org/project/turnstile_protect", | ||
"support": { | ||
"issues": "https://www.drupal.org/project/issues/turnstile_protect" | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "Joe Corall", | ||
"email": "[email protected]", | ||
"role": "Owner" | ||
} | ||
], | ||
"require" : { | ||
"drupal/turnstile": "^1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace Drupal\Tests\turnstile_protect\Kernel; | ||
|
||
use Drupal\KernelTests\KernelTestBase; | ||
|
||
/** | ||
* Tests basic functionality of the YourModule module. | ||
* | ||
* @group turnstile_protect | ||
*/ | ||
class TurnstileProtectTest extends KernelTestBase { | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected static $modules = [ | ||
'turnstile_protect', | ||
'system', | ||
]; | ||
|
||
/** | ||
* Tests if the module is enabled. | ||
*/ | ||
public function testModuleEnabled() { | ||
$this->assertTrue( | ||
$this->container->get('module_handler')->moduleExists('turnstile_protect'), | ||
'The turnstile_protect module is enabled.' | ||
); | ||
} | ||
|
||
/** | ||
* Tests basic configuration or service. | ||
*/ | ||
public function testBasicFunctionality() { | ||
$config = $this->config('turnstile_protect.settings'); | ||
$this->assertNotEmpty( | ||
$config, | ||
'turnstile_protect settings configuration is available.' | ||
); | ||
} | ||
|
||
} |