Skip to content

Commit

Permalink
PHPStan 1.7 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Jun 4, 2022
1 parent 277c7e4 commit a541d00
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/integration/DispatcherHtmlTest.php
Expand Up @@ -13,7 +13,7 @@ public function _before(): void {

parent::_before();

$admin = $this->factory->user->create_and_get( array(
$admin = self::factory()->user->create_and_get( array(
'role' => 'administrator',
) );

Expand Down
3 changes: 0 additions & 3 deletions tests/integration/Test.php
Expand Up @@ -4,9 +4,6 @@

namespace QM\Tests;

/**
* @property \WP_UnitTest_Factory $factory
*/
abstract class Test extends \Codeception\TestCase\WPTestCase {

public function _before(): void {
Expand Down
7 changes: 7 additions & 0 deletions tests/phpstan/stubs.php
Expand Up @@ -35,6 +35,13 @@ function members_register_cap_group( string $name, array $args = [] ): void {}

function members_register_cap( string $name, array $args = [] ): void {}

// WPBrowser compatibility:

class_alias(
'\\Codeception\\Test\\Unit',
'\\tad\\WPBrowser\\Compat\\Codeception\\Unit'
);

// Compat functions:

/**
Expand Down

0 comments on commit a541d00

Please sign in to comment.