10000 Add 'form-control-range' for range input type by Oviglo · Pull Request #40422 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Add 'form-control-range' for range input type #40422

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 13 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update AbstractBootstrap4LayoutTest.php
Apudate bootstrap range test
  • Loading branch information
Oviglo committed Mar 15, 2021
commit 0c74ad470a8c53dbb8263b5a39dc4761435b1300
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,37 @@ public function testPercentCustomSymbol()
[contains(.., "‱")]
]
]
'
);
}

public function testRange()
{
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RangeType', 42, ['attr' => ['min' => 5]]);

$this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']],
'/input
[@type="range"]
[@name="name"]
[@value="42"]
[@min="5"]
[@class="my&class form-control-range"]
'
);
}

public function testRangeWithMinMaxValues()
{
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\RangeType', 42, ['attr' => ['min' => 5, 'max' => 57]]);

$this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']],
'/input
[@type="range"]
[@name="name"]
[@value="42"]
[@min="5"]
[@max="57"]
[@class="my&class form-control-range"]
'
);
}
Expand Down
0