Skip to content
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

Unknown named parameter $method #12

Open
renege opened this issue Aug 13, 2024 · 1 comment
Open

Unknown named parameter $method #12

renege opened this issue Aug 13, 2024 · 1 comment

Comments

@renege
Copy link

renege commented Aug 13, 2024

Hello @freekmurze ,

My test:

routeTesting('upper')
	->include('up')
	->assertSuccessful();

routeTesting('all api routes')
	->include('api/*')
	->setUp(function () {
		$this->actingAs($user = User::factory()->create());
		$this->bind('user', $user);

		$this->bind('agenda', Agenda::factory()->create());
	
	})
	// ->bind('agenda', Agenda::factory()->create())
	->ignoreRoutesWithMissingBindings()
	->assertSuccessful();

Results in:

   FAIL  Tests\Feature\RouteApiTest
  ✓ foobar                                                                                                                                                                                                                                                                                                                                                          0.13s  
  ✓ upper with ('GET', 'up')                                                                                                                                                                                                                                                                                                                                        0.12s  
  ⨯ all api routes with ('GET', 'api/agendas')   

   FAILED  Tests\Feature\RouteApiTest > all api routes with ('GET', 'api/agendas')                                                                                                                                                                                                                                                                                 Error   
  Unknown named parameter $method
  str_replace(): Argument #3 ($subject) must be of type array|string, null given

I don't know where $method nor $subject is used and what is needed to solve this?

Just a normale API Resource route at Route::apiResource('agendas', AgendaController::class);

@txdFabio
Copy link

txdFabio commented Oct 7, 2024

I think it's a duplicate of this issue: #6 (which actually doesn't have any solution)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants