mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
chore: coding style
This commit is contained in:
@ -4,8 +4,6 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Pest;
|
namespace Pest;
|
||||||
|
|
||||||
use Pest\TestSuite;
|
|
||||||
|
|
||||||
final class Plugin
|
final class Plugin
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@ -21,9 +19,9 @@ final class Plugin
|
|||||||
/**
|
/**
|
||||||
* Lazy loads an `uses` call on the context of plugins.
|
* Lazy loads an `uses` call on the context of plugins.
|
||||||
*/
|
*/
|
||||||
public static function uses(...$traits): void
|
public static function uses(string ...$traits): void
|
||||||
{
|
{
|
||||||
self::$callables[] = function () use ($traits) {
|
self::$callables[] = function () use ($traits): void {
|
||||||
uses(...$traits)->in(TestSuite::getInstance()->rootPath . DIRECTORY_SEPARATOR . 'tests');
|
uses(...$traits)->in(TestSuite::getInstance()->rootPath . DIRECTORY_SEPARATOR . 'tests');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -95,6 +95,9 @@
|
|||||||
PASS Tests\Playground
|
PASS Tests\Playground
|
||||||
✓ basic
|
✓ basic
|
||||||
|
|
||||||
|
PASS Tests\Plugins\Traits
|
||||||
|
✓ it allows global uses
|
||||||
|
|
||||||
PASS Tests\Unit\Actions\AddsCoverage
|
PASS Tests\Unit\Actions\AddsCoverage
|
||||||
✓ it adds coverage if --coverage exist
|
✓ it adds coverage if --coverage exist
|
||||||
✓ it adds coverage if --min exist
|
✓ it adds coverage if --min exist
|
||||||
@ -132,5 +135,5 @@
|
|||||||
WARN Tests\Visual\Success
|
WARN Tests\Visual\Success
|
||||||
s visual snapshot of test suite on success
|
s visual snapshot of test suite on success
|
||||||
|
|
||||||
Tests: 6 skipped, 69 passed
|
Tests: 6 skipped, 70 passed
|
||||||
Time: 2.63s
|
Time: 2.68s
|
||||||
|
|||||||
@ -6,7 +6,7 @@ if (class_exists(NunoMaduro\Collision\Provider::class)) {
|
|||||||
|
|
||||||
trait PluginTrait
|
trait PluginTrait
|
||||||
{
|
{
|
||||||
function assertPluginTraitGotRegistered(): void
|
public function assertPluginTraitGotRegistered(): void
|
||||||
{
|
{
|
||||||
assertTrue(true);
|
assertTrue(true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user