forked from symfony/symfony
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature symfony#38287 [DomCrawler] Add checkbox assertions for functi…
…onal tests (mnapoli) This PR was merged into the 5.2-dev branch. Discussion ---------- [DomCrawler] Add checkbox assertions for functional tests | Q | A | ------------- | --- | Branch? | master for features | Bug fix? | no | New feature? | yes <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Add new assertions for checkboxes, to use in functional tests. Example: ```php public function testAssertCheckboxChecked() { $this->visit('/edit-form'); $this->client->submitForm('Save', [ 'activateMembership' => 'on', ]); self::assertResponseIsSuccessful(); // Check that the field is checked after the form was submitted self::assertCheckboxChecked('activateMembership'); } ``` This wasn't possible to achieve with the existing `self::assertInputValueSame()` assertion. Commits ------- f26758e [DomCrawler] Add `assertCheckboxChecked()`
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters