Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianSchmick committed Oct 15, 2024
1 parent 680eafa commit ec8ad73
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/Functional/EmbeddedShortcodeHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ public static function provideEsiShortcodes(): Generator
/**
* @test
*/
public function validate_valid_controller_names(): void
public function throws_no_exception_on_valid_controller_name(): void
{
$this->expectNotToPerformAssertions();

new EmbeddedShortcodeHandler(
$this->createMock(FragmentHandler::class),
GuideController::class.'::detailAction',
ShortcodeTestController::class.'::test',
'inline',
$this->createMock(RequestStack::class)
);
Expand All @@ -88,7 +88,7 @@ public function validate_valid_controller_names(): void
*
* @dataProvider provideControllerNames
*/
public function validate_invalid_controller_names(string $controllerName): void
public function throws_exception_on_invalid_controller_names(string $controllerName): void
{
$this->expectException(InvalidArgumentException::class);

Expand All @@ -98,9 +98,9 @@ public function validate_invalid_controller_names(string $controllerName): void
public function provideControllerNames(): Generator
{
yield 'Empty string' => [''];
yield 'Not existing controller' => ['Foo/Bar/Not/Exist::method'];
yield 'Missing method name' => [GuideController::class];
yield 'Not existing method' => [GuideController::class.'_notExistingMethod'];
yield 'Not existing controller' => ['Foo\Bar::baz'];
yield 'Missing method name' => [ShortcodeTestController::class];
yield 'Not existing method' => [ShortcodeTestController::class.'_notExistingMethod'];
}

private function processShortcodes(string $content, ?Request $request = null): string
Expand Down

0 comments on commit ec8ad73

Please sign in to comment.