mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
feat: improves DX on auto-complete
This commit is contained in:
@ -40,8 +40,8 @@ use function array_diff;
|
|||||||
use function array_values;
|
use function array_values;
|
||||||
use function basename;
|
use function basename;
|
||||||
use function class_exists;
|
use function class_exists;
|
||||||
use function get_declared_classes;
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use function get_declared_classes;
|
||||||
use Pest\Contracts\HasPrintableTestCaseName;
|
use Pest\Contracts\HasPrintableTestCaseName;
|
||||||
use Pest\TestCases\IgnorableTestCase;
|
use Pest\TestCases\IgnorableTestCase;
|
||||||
use Pest\TestSuite;
|
use Pest\TestSuite;
|
||||||
@ -108,7 +108,6 @@ final class TestSuiteLoader
|
|||||||
if (
|
if (
|
||||||
is_subclass_of($loadedClass, HasPrintableTestCaseName::class)
|
is_subclass_of($loadedClass, HasPrintableTestCaseName::class)
|
||||||
|| is_subclass_of($loadedClass, TestCase::class)) {
|
|| is_subclass_of($loadedClass, TestCase::class)) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$class = new ReflectionClass($loadedClass);
|
$class = new ReflectionClass($loadedClass);
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
|
|||||||
@ -14,6 +14,7 @@ parameters:
|
|||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
- "#Language construct isset\\(\\) should not be used.#"
|
- "#Language construct isset\\(\\) should not be used.#"
|
||||||
- "#is not allowed to extend#"
|
- "#is not allowed to extend#"
|
||||||
|
- "#is concrete, but does not have a Test suffix#"
|
||||||
- "#with a nullable type declaration#"
|
- "#with a nullable type declaration#"
|
||||||
- "#type mixed is not subtype of native#"
|
- "#type mixed is not subtype of native#"
|
||||||
- "# with null as default value#"
|
- "# with null as default value#"
|
||||||
|
|||||||
@ -88,7 +88,7 @@ if (! function_exists('test')) {
|
|||||||
* is the test description; the second argument is
|
* is the test description; the second argument is
|
||||||
* a closure that contains the test expectations.
|
* a closure that contains the test expectations.
|
||||||
*
|
*
|
||||||
* @return HigherOrderTapProxy<TestCall|TestCase>|TestCall|mixed
|
* @return TestCall|TestCase|mixed
|
||||||
*/
|
*/
|
||||||
function test(string $description = null, Closure $closure = null): HigherOrderTapProxy|TestCall
|
function test(string $description = null, Closure $closure = null): HigherOrderTapProxy|TestCall
|
||||||
{
|
{
|
||||||
@ -108,7 +108,7 @@ if (! function_exists('it')) {
|
|||||||
* is the test description; the second argument is
|
* is the test description; the second argument is
|
||||||
* a closure that contains the test expectations.
|
* a closure that contains the test expectations.
|
||||||
*
|
*
|
||||||
* @return HigherOrderTapProxy<TestCall|TestCase>|TestCall|mixed
|
* @return TestCall|TestCase|mixed
|
||||||
*/
|
*/
|
||||||
function it(string $description, Closure $closure = null): TestCall
|
function it(string $description, Closure $closure = null): TestCall
|
||||||
{
|
{
|
||||||
@ -127,7 +127,7 @@ if (! function_exists('todo')) {
|
|||||||
* is marked as incomplete. Yet, Collision, Pest's
|
* is marked as incomplete. Yet, Collision, Pest's
|
||||||
* printer, will display it as a "todo" test.
|
* printer, will display it as a "todo" test.
|
||||||
*
|
*
|
||||||
* @return HigherOrderTapProxy<TestCall|TestCase>|TestCall|mixed
|
* @return TestCall|TestCase|mixed
|
||||||
*/
|
*/
|
||||||
function todo(string $description): TestCall
|
function todo(string $description): TestCall
|
||||||
{
|
{
|
||||||
|
|||||||
@ -15,11 +15,12 @@ use Pest\Support\Exporter;
|
|||||||
use Pest\Support\HigherOrderCallables;
|
use Pest\Support\HigherOrderCallables;
|
||||||
use Pest\Support\NullClosure;
|
use Pest\Support\NullClosure;
|
||||||
use Pest\TestSuite;
|
use Pest\TestSuite;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*
|
*
|
||||||
* @mixin HigherOrderCallables
|
* @mixin HigherOrderCallables|TestCase
|
||||||
*/
|
*/
|
||||||
final class TestCall
|
final class TestCall
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,10 +10,6 @@ use Throwable;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*
|
|
||||||
* @template TProxy
|
|
||||||
*
|
|
||||||
* @mixin TProxy
|
|
||||||
*/
|
*/
|
||||||
final class HigherOrderTapProxy
|
final class HigherOrderTapProxy
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user