publicfunctiontestAssertNoFormValue() { $this->getCrawlerTester(newCrawler('<html><body><form id="form"><input type="checkbox" name="rememberMe">', 'http://localhost'))->assertNoFormValue('#form', 'rememberMe'); $this->expectException(AssertionFailedError::class); $this->expectExceptionMessage('Field "rememberMe" has a value in form "#form".'); $this->getCrawlerTester(newCrawler('<html><body><form id="form"><input type="checkbox" name="rememberMe" checked>', 'http://localhost'))->assertNoFormValue('#form', 'rememberMe'); }
publicfunctiontestAssertRouteSame() { $this->getRequestTester()->assertRouteSame('homepage', ['foo' => 'bar']); $this->expectException(AssertionFailedError::class); $this->expectExceptionMessage('Failed asserting that the Request has attribute "_route" with value "articles".'); $this->getRequestTester()->assertRouteSame('articles'); }