publicfunctiontestAssertSelectorTextNotContains() { $this->getCrawlerTester(newCrawler('<html><body><h1>Foo'))->assertSelectorTextNotContains('body > h1', 'Bar'); $this->expectException(AssertionFailedError::class); $this->expectExceptionMessage('matches selector "body > h1" and the text "Foo" of the node matching selector "body > h1" does not contain "Foo".'); $this->getCrawlerTester(newCrawler('<html><body><h1>Foo'))->assertSelectorTextNotContains('body > h1', 'Foo'); }