diff --git a/composer.json b/composer.json index 789284ec..1c0acbd7 100644 --- a/composer.json +++ b/composer.json @@ -50,9 +50,6 @@ ] }, "require-dev": { - "illuminate/console": "^9.30.1", - "illuminate/support": "^9.30.1", - "laravel/dusk": "^7.0.1", "pestphp/pest-dev-tools": "^2.0.0" }, "minimum-stability": "dev", @@ -83,9 +80,6 @@ ] }, "extra": { - "branch-alias": { - "dev-next": "2.x-dev" - }, "pest": { "plugins": [ "Pest\\Plugins\\Coverage", @@ -97,11 +91,6 @@ "Pest\\Plugins\\Retry", "Pest\\Plugins\\Version" ] - }, - "laravel": { - "providers": [ - "Pest\\Laravel\\PestServiceProvider" - ] } } } diff --git a/src/Laravel/Commands/PestDatasetCommand.php b/src/Laravel/Commands/PestDatasetCommand.php deleted file mode 100644 index 8c088d41..00000000 --- a/src/Laravel/Commands/PestDatasetCommand.php +++ /dev/null @@ -1,74 +0,0 @@ -option('test-directory')); - - /** @var string $name */ - $name = $this->argument('name'); - - $relativePath = sprintf(testDirectory('DatasetsRepository/%s.php'), ucfirst($name)); - - /* @phpstan-ignore-next-line */ - $target = base_path($relativePath); - - if (File::exists($target)) { - throw new InvalidConsoleArgument(sprintf('%s already exist', $target)); - } - - if (! File::exists(dirname($relativePath))) { - File::makeDirectory(dirname($relativePath)); - } - - $contents = File::get(implode(DIRECTORY_SEPARATOR, [ - dirname(__DIR__, 3), - 'stubs', - 'Dataset.php', - ])); - - $name = mb_strtolower($name); - $contents = str_replace('{dataset_name}', $name, $contents); - - $element = Str::singular($name); - $contents = str_replace('{dataset_element}', $element, $contents); - File::put($target, str_replace('{dataset_name}', $name, $contents)); - $message = sprintf('`%s` created successfully.', $relativePath); - - $this->output->success($message); - } -} diff --git a/src/Laravel/Commands/PestDuskCommand.php b/src/Laravel/Commands/PestDuskCommand.php deleted file mode 100644 index cdad1ad4..00000000 --- a/src/Laravel/Commands/PestDuskCommand.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ - protected function binary(): array - { - if ('phpdbg' === PHP_SAPI) { - return [PHP_BINARY, '-qrr', 'vendor/pestphp/pest/bin/pest']; - } - - return [PHP_BINARY, 'vendor/pestphp/pest/bin/pest']; - } -} diff --git a/src/Laravel/Commands/PestInstallCommand.php b/src/Laravel/Commands/PestInstallCommand.php deleted file mode 100644 index 7f833a1f..00000000 --- a/src/Laravel/Commands/PestInstallCommand.php +++ /dev/null @@ -1,65 +0,0 @@ -option('test-directory')); - - /* @phpstan-ignore-next-line */ - $pest = base_path(testDirectory('Pest.php')); - - if (File::exists($pest)) { - throw new InvalidConsoleArgument(sprintf('%s already exist', $pest)); - } - - File::copy(implode(DIRECTORY_SEPARATOR, [ - dirname(__DIR__, 3), - self::STUBS, - 'Pest.php', - ]), $pest); - - $this->output->success('`tests/Pest.php` created successfully.'); - - if (! (bool) $this->option('no-interaction')) { - (new Thanks($this->output))(); - } - } -} diff --git a/src/Laravel/Commands/PestTestCommand.php b/src/Laravel/Commands/PestTestCommand.php deleted file mode 100644 index bdf6bfd5..00000000 --- a/src/Laravel/Commands/PestTestCommand.php +++ /dev/null @@ -1,77 +0,0 @@ -option('test-directory')); - - /** @var string $name */ - $name = $this->argument('name'); - - $type = ((bool) $this->option('unit')) ? 'Unit' : (((bool) $this->option('dusk')) ? 'Browser' : 'Feature'); - - $relativePath = sprintf( - testDirectory('%s/%s.php'), - $type, - ucfirst($name) - ); - - /* @phpstan-ignore-next-line */ - $target = base_path($relativePath); - - if (! File::isDirectory(dirname((string) $target))) { - File::makeDirectory(dirname((string) $target), 0777, true, true); - } - - if (File::exists($target) && ! (bool) $this->option('force')) { - throw new InvalidConsoleArgument(sprintf('%s already exist', $target)); - } - - $contents = File::get(implode(DIRECTORY_SEPARATOR, [ - dirname(__DIR__, 3), - 'stubs', - sprintf('%s.php', $type), - ])); - - $name = mb_strtolower($name); - $name = Str::endsWith($name, 'test') ? mb_substr($name, 0, -4) : $name; - - File::put($target, str_replace('{name}', $name, $contents)); - $message = sprintf('`%s` created successfully.', $relativePath); - - $this->output->success($message); - } -} diff --git a/src/Laravel/PestServiceProvider.php b/src/Laravel/PestServiceProvider.php deleted file mode 100644 index 01505d33..00000000 --- a/src/Laravel/PestServiceProvider.php +++ /dev/null @@ -1,35 +0,0 @@ -app->runningInConsole()) { - $this->commands([ - PestInstallCommand::class, - PestTestCommand::class, - PestDatasetCommand::class, - ]); - - if (class_exists(DuskCommand::class)) { - $this->commands([ - PestDuskCommand::class, - ]); - } - } - } -} diff --git a/tests/Features/Expect/toHaveLength.php b/tests/Features/Expect/toHaveLength.php index bd41066b..c36aafd5 100644 --- a/tests/Features/Expect/toHaveLength.php +++ b/tests/Features/Expect/toHaveLength.php @@ -5,9 +5,10 @@ use PHPUnit\Framework\ExpectationFailedException; it('passes', function ($value) { expect($value)->toHaveLength(9); })->with([ - 'Fortaleza', 'Sollefteå', 'Ιεράπετρα', + 'Fortaleza', + 'Sollefteå', + 'Ιεράπετρα', (object) [1, 2, 3, 4, 5, 6, 7, 8, 9], - collect([1, 2, 3, 4, 5, 6, 7, 8, 9]), ]); it('passes with array', function () { diff --git a/tests/Features/Macro.php b/tests/Features/Macro.php deleted file mode 100644 index c0893355..00000000 --- a/tests/Features/Macro.php +++ /dev/null @@ -1,16 +0,0 @@ -macro('bar', function () { - expect($this)->toBeInstanceOf(TestCase::class); -}); - -it('can call chained macro method')->bar(); - -it('will throw exception from call if no macro exists') - ->throws(BadMethodCallException::class) - ->foo();