Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Rename EnableHttpMethodParameterOverride to EnableHttpMethodParameter…
Browse files Browse the repository at this point in the history
…OverrideListener
  • Loading branch information
Paramtamtam committed Jul 10, 2020
1 parent 1a6b764 commit 4f3d253
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ The format is based on [Keep a Changelog][keepachangelog] and this project adher

### Added

- Listener `EnableHttpMethodParameterOverride` for forced support of `_method` request parameter (for determining the intended HTTP method) [#9]
- Listener `EnableHttpMethodParameterOverrideListener` for forced support of `_method` request parameter (for determining the intended HTTP method) [#9]

### Changed

- Listener `EnableHttpMethodParameterOverride` is enabled by default in the configuration file [#9]
- Listener `EnableHttpMethodParameterOverrideListener` is enabled by default in the configuration file [#9]

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion config/roadrunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
],

Events\BeforeLoopIterationEvent::class => [
Listeners\EnableHttpMethodParameterOverride::class,
Listeners\EnableHttpMethodParameterOverrideListener::class,
Listeners\RebindHttpKernelListener::class, // Laravel 7 issue: <https://git.io/JvPpf>
Listeners\RebindViewListener::class,
Listeners\CloneConfigListener::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @link https://github.com/spiral/roadrunner-laravel/pull/9
* @see RebindRouterListener
*/
class EnableHttpMethodParameterOverride implements ListenerInterface
class EnableHttpMethodParameterOverrideListener implements ListenerInterface
{
/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@
namespace Spiral\RoadRunnerLaravel\Tests\Listeners;

use Mockery as m;
use Symfony\Component\HttpFoundation\Request;
use Spiral\RoadRunnerLaravel\Events\Contracts\WithHttpRequest;
use Spiral\RoadRunnerLaravel\Listeners\EnableHttpMethodParameterOverride;
use Spiral\RoadRunnerLaravel\Listeners\EnableHttpMethodParameterOverrideListener;

/**
* @covers \Spiral\RoadRunnerLaravel\Listeners\EnableHttpMethodParameterOverride<extended>
* @covers \Spiral\RoadRunnerLaravel\Listeners\EnableHttpMethodParameterOverrideListener<extended>
*/
class EnableHttpMethodParameterOverrideTest extends AbstractListenerTestCase
class EnableHttpMethodParameterOverrideListenerTest extends AbstractListenerTestCase
{
/**
* {@inheritdoc}
*/
public function testHandle(): void
{
$request = $this->app->make('request');

/** @var m\MockInterface|WithHttpRequest $event_mock */
$event_mock = m::mock(WithHttpRequest::class)
->makePartial()
Expand All @@ -36,10 +35,10 @@ public function testHandle(): void
}

/**
* @return EnableHttpMethodParameterOverride
* @return EnableHttpMethodParameterOverrideListener
*/
protected function listenerFactory(): EnableHttpMethodParameterOverride
protected function listenerFactory(): EnableHttpMethodParameterOverrideListener
{
return new EnableHttpMethodParameterOverride();
return new EnableHttpMethodParameterOverrideListener();
}
}

0 comments on commit 4f3d253

Please sign in to comment.