Skip to content

Commit 6ad0c3b

Browse files
committed
Compatibility with Symfony 5
1 parent 3e5df13 commit 6ad0c3b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"require": {
2121
"php": ">=5.6.0 <8.0",
2222
"codeception/codeception": "*@dev",
23-
"symfony/browser-kit": ">=2.7 <5.0",
24-
"symfony/dom-crawler": ">=2.7 <5.0"
23+
"symfony/browser-kit": ">=2.7 <6.0",
24+
"symfony/dom-crawler": ">=2.7 <6.0"
2525
},
2626
"require-dev": {
2727
"codeception/util-universalframework": "dev-master"

src/Codeception/Lib/InnerBrowser.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,15 +539,18 @@ public function seeLink($text, $url = null)
539539
$this->assertTrue(true);
540540
}
541541

542-
public function dontSeeLink($text, $url = null)
542+
public function dontSeeLink($text, $url = '')
543543
{
544544
$crawler = $this->getCrawler()->selectLink($text);
545545
if (!$url) {
546546
if ($crawler->count() > 0) {
547547
$this->fail("Link containing text '$text' was found in page " . $this->_getCurrentUri());
548548
}
549549
}
550-
$crawler = $crawler->filterXPath(sprintf('.//a[substring(@href, string-length(@href) - string-length(%1$s) + 1)=%1$s]', Crawler::xpathLiteral($url)));
550+
$crawler = $crawler->filterXPath(
551+
sprintf('.//a[substring(@href, string-length(@href) - string-length(%1$s) + 1)=%1$s]',
552+
Crawler::xpathLiteral($url))
553+
);
551554
if ($crawler->count() > 0) {
552555
$this->fail("Link containing text '$text' and URL '$url' was found in page " . $this->_getCurrentUri());
553556
}

0 commit comments

Comments
 (0)