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'); }
publicfunctiontestAssertRequestAttributeValueSame() { $this->getRequestTester()->assertRequestAttributeValueSame('foo', 'bar'); $this->expectException(AssertionFailedError::class); $this->expectExceptionMessage('Failed asserting that the Request has attribute "foo" with value "baz".'); $this->getRequestTester()->assertRequestAttributeValueSame('foo', 'baz'); }