Skip to content

Commit

Permalink
Fix Test_Login_Nonce for 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Jan 9, 2024
1 parent ba6ba84 commit d88104f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,14 @@
},
"scripts": {
"fixer": "php-cs-fixer -v fix --allow-risky=yes",
"lint": "@phpcs",
"phpcbf": "phpcbf",
"phpcs": "phpcs",
"phpunit": "phpunit"
"phpunit": "phpunit",
"test": [
"@phpcs",
"@phpunit"
]
},
"extra": {
"wordpress-autoloader": {
Expand Down
13 changes: 13 additions & 0 deletions tests/alley/wp/alleyvate/features/test-login-nonce.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,19 @@ final class Test_Login_Nonce extends Test_Case {
*/
private Login_Nonce $feature;

/**
* Setup the test case.
*
* @param array ...$args The array of arguments passed to the class.
*/
public function __construct( ...$args ) {
parent::__construct( ...$args );

// Run the test in isolation to allow us to use http_response_code().
$this->setPreserveGlobalState( false );
$this->setRunClassInSeparateProcess( true );
}

/**
* Set up.
*/
Expand Down

0 comments on commit d88104f

Please sign in to comment.