10000 [Form] Add `MultiStepType` by silasjoisten · Pull Request #59548 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Form] Add MultiStepType #59548

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

Closed
wants to merge 16 commits into from
Prev Previous commit
Next Next commit
Fix
  • Loading branch information
silasjoisten committed Jan 18, 2025
commit 92c89e6b43aec2a456a42ca4edf5d23b97b3a466
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
*/
final class MultiStepTypeTest extends TypeTestCase
{
public function testConfigureOptionsWithoutStepsThrowsException(): void
public function testConfigureOptionsWithoutStepsThrowsException()
{
self::expectException(MissingOptionsException::class);

$this->factory->create(MultiStepType::class);
}

public function testConfigureOptionsWithStepsSetsDefaultForCurrentStepName(): void
public function testConfigureOptionsWithStepsSetsDefaultForCurrentStepName()
{
$form = $this->factory->create(MultiStepType::class, [], [
'steps' => [
Expand All @@ -56,7 +56,7 @@ public function testBuildViewHasStepNames(): void
self::assertSame(['general', 'contact', 'newsletter'], $form->createView()->vars['steps_names']);
}

public function testFormOnlyHasCurrentStepForm(): void
public function testFormOnlyHasCurrentStepForm()
{
$form = $this->factory->create(MultiStepType::class, [], [
'steps' => [
Expand All @@ -80,7 +80,7 @@ public function testFormOnlyHasCurrentStepForm(): void
self::assertArrayNotHasKey('city', $form->createView()->children);
}

public function testFormStepCanBeClassString(): void
public function testFormStepCanBeClassString()
{
$form = $this->factory->create(MultiStepType::class, ['current_step_name' => 'author'], [
'steps' => [
Expand All @@ -101,7 +101,7 @@ public function testFormStepCanBeClassString(): void
self::assertArrayHasKey('author', $form->createView()->children);
}

public function testFormStepWithNormalStringWillThrowException(): void
public function testFormStepWithNormalStringWillThrowException()
{
self::expectException(\InvalidArgumentException::class);

Expand All @@ -122,7 +122,7 @@ public function testFormStepWithNormalStringWillThrowException(): void
]);
}

public function testFormStepWithClassStringNotExtendingAbstractTypeWillThrowException(): void
public function testFormStepWithClassStringNotExtendingAbstractTypeWillThrowException()
{
self::expectException(\InvalidArgumentException::class);

Expand Down
Loading
0