Nwidart\Modules\tests\Commands\GenerateMiddlewareCommandTest::it_generated_correct_file_with_content PHP Method

it_generated_correct_file_with_content() public method

    public function it_generated_correct_file_with_content()
    {
        $this->artisan('module:make-middleware', ['name' => 'SomeMiddleware', 'module' => 'Blog']);
        $file = $this->finder->get($this->modulePath . '/Http/Middleware/SomeMiddleware.php');
        $this->assertTrue(str_contains($file, 'class SomeMiddleware'));
        $this->assertTrue(str_contains($file, 'public function handle(Request $request, Closure $next)'));
    }