Skip to content

feat: import namespaces over tests #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Composer\Pcre;

use Throwable;
use PHPUnit\Framework\TestCase;

class BaseTestCase extends TestCase
Expand All @@ -19,7 +20,7 @@ class BaseTestCase extends TestCase
protected $pregFunction = null;

/**
* @param class-string<\Throwable> $class
* @param class-string<Throwable> $class
*/
protected function doExpectException(string $class, ?string $message = null): void
{
Expand Down
3 changes: 2 additions & 1 deletion tests/PHPStanTests/InvalidRegexPatternRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Composer\Pcre\PHPStanTests;

use PHPStan\Rules\Rule;
use PHPStan\Testing\RuleTestCase;
use Composer\Pcre\PHPStan\InvalidRegexPatternRule;
use PHPStan\Type\Php\RegexArrayShapeMatcher;
Expand All @@ -24,7 +25,7 @@
*/
class InvalidRegexPatternRuleTest extends RuleTestCase
{
protected function getRule(): \PHPStan\Rules\Rule
protected function getRule(): Rule
{
return new InvalidRegexPatternRule();
}
Expand Down
3 changes: 2 additions & 1 deletion tests/PHPStanTests/UnsafeStrictGroupsCallRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Composer\Pcre\PHPStanTests;

use PHPStan\Rules\Rule;
use PHPStan\Testing\RuleTestCase;
use Composer\Pcre\PHPStan\UnsafeStrictGroupsCallRule;
use PHPStan\Type\Php\RegexArrayShapeMatcher;
Expand All @@ -24,7 +25,7 @@
*/
class UnsafeStrictGroupsCallRuleTest extends RuleTestCase
{
protected function getRule(): \PHPStan\Rules\Rule
protected function getRule(): Rule
{
return new UnsafeStrictGroupsCallRule(self::getContainer()->getByType(RegexArrayShapeMatcher::class));
}
Expand Down