diff --git a/module/Rest/config/dependencies.config.php b/module/Rest/config/dependencies.config.php index 3fae9af7..d3bff420 100644 --- a/module/Rest/config/dependencies.config.php +++ b/module/Rest/config/dependencies.config.php @@ -18,7 +18,7 @@ return [ Action\ResolveUrlAction::class => AnnotatedFactory::class, Action\GetVisitsAction::class => AnnotatedFactory::class, Action\ListShortcodesAction::class => AnnotatedFactory::class, - Action\EditTagsAction::class => AnnotatedFactory::class, + Action\EditShortcodeTagsAction::class => AnnotatedFactory::class, Middleware\BodyParserMiddleware::class => AnnotatedFactory::class, Middleware\CrossDomainMiddleware::class => InvokableFactory::class, diff --git a/module/Rest/config/routes.config.php b/module/Rest/config/routes.config.php index 4edf4658..8344e52a 100644 --- a/module/Rest/config/routes.config.php +++ b/module/Rest/config/routes.config.php @@ -37,7 +37,7 @@ return [ [ 'name' => 'rest-edit-tags', 'path' => '/rest/v{version:1}/short-codes/{shortCode}/tags', - 'middleware' => Action\EditTagsAction::class, + 'middleware' => Action\EditShortcodeTagsAction::class, 'allowed_methods' => ['PUT'], ], ], diff --git a/module/Rest/src/Action/EditTagsAction.php b/module/Rest/src/Action/EditShortcodeTagsAction.php similarity index 96% rename from module/Rest/src/Action/EditTagsAction.php rename to module/Rest/src/Action/EditShortcodeTagsAction.php index 075e65f0..9eab0759 100644 --- a/module/Rest/src/Action/EditTagsAction.php +++ b/module/Rest/src/Action/EditShortcodeTagsAction.php @@ -13,7 +13,7 @@ use Shlinkio\Shlink\Rest\Util\RestUtils; use Zend\Diactoros\Response\JsonResponse; use Zend\I18n\Translator\TranslatorInterface; -class EditTagsAction extends AbstractRestAction +class EditShortcodeTagsAction extends AbstractRestAction { /** * @var ShortUrlServiceInterface @@ -25,7 +25,7 @@ class EditTagsAction extends AbstractRestAction private $translator; /** - * EditTagsAction constructor. + * EditShortcodeTagsAction constructor. * @param ShortUrlServiceInterface $shortUrlService * @param TranslatorInterface $translator * @param LoggerInterface|null $logger diff --git a/module/Rest/test/Action/EditTagsActionTest.php b/module/Rest/test/Action/EditShortcodeTagsActionTest.php similarity index 89% rename from module/Rest/test/Action/EditTagsActionTest.php rename to module/Rest/test/Action/EditShortcodeTagsActionTest.php index 518925ab..72f1dee9 100644 --- a/module/Rest/test/Action/EditTagsActionTest.php +++ b/module/Rest/test/Action/EditShortcodeTagsActionTest.php @@ -6,15 +6,15 @@ use Prophecy\Prophecy\ObjectProphecy; use Shlinkio\Shlink\Core\Entity\ShortUrl; use Shlinkio\Shlink\Core\Exception\InvalidShortCodeException; use Shlinkio\Shlink\Core\Service\ShortUrlService; -use Shlinkio\Shlink\Rest\Action\EditTagsAction; +use Shlinkio\Shlink\Rest\Action\EditShortcodeTagsAction; use ShlinkioTest\Shlink\Common\Util\TestUtils; use Zend\Diactoros\ServerRequestFactory; use Zend\I18n\Translator\Translator; -class EditTagsActionTest extends TestCase +class EditShortcodeTagsActionTest extends TestCase { /** - * @var EditTagsAction + * @var EditShortcodeTagsAction */ protected $action; /** @@ -25,7 +25,7 @@ class EditTagsActionTest extends TestCase public function setUp() { $this->shortUrlService = $this->prophesize(ShortUrlService::class); - $this->action = new EditTagsAction($this->shortUrlService->reveal(), Translator::factory([])); + $this->action = new EditShortcodeTagsAction($this->shortUrlService->reveal(), Translator::factory([])); } /**