You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to test a component in my Plugin that receives an ajax request as usual.
To get the input, the Component uses the input() function, so I probably need to make an actual POST Request and register a route for this.
This is what I have so far:
public function testItThrowsExceptionWhenNothingFound(): void
{
$controller = new Controller();
$anfrage = new Component();
$this->app['router']->get('/endpoint', function () {
return 'A';
});
$this->get('endpoint')->dd();
}
I get <p>page not found</p> as Response, so it probably is not even registering the route...
Am I doing something wrong here? What would be the proper way to set this up?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm trying to test a component in my Plugin that receives an ajax request as usual.
To get the input, the Component uses the
input()
function, so I probably need to make an actual POST Request and register a route for this.This is what I have so far:
I get
<p>page not found</p>
as Response, so it probably is not even registering the route...Am I doing something wrong here? What would be the proper way to set this up?
Cheers
Beta Was this translation helpful? Give feedback.
All reactions