8000 Merge pull request #2 from Codeception/symfony5 · Codeception/lib-innerbrowser@170c66c · GitHub
[go: up one dir, main page]

Skip to content

Commit 170c66c

Browse files
authored
Merge pull request #2 from Codeception/symfony5
Compatibility with Symfony 5
2 parents 8f7383d + 6ad0c3b commit 170c66c

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
@@ -557,15 +557,18 @@ public function seeLink($text, $url = null)
557557
$this->assertTrue(true);
558558
}
559559

560-
public function dontSeeLink($text, $url = null)
560+
public function dontSeeLink($text, $url = '')
561561
{
562562
$crawler = $this->getCrawler()->selectLink($text);
563563
if (!$url) {
564564
if ($crawler->count() > 0) {
565565
$this->fail("Link containing text '$text' was found in page " . $this->_getCurrentUri());
566566
}
567567
}
568-
$crawler = $crawler->filterXPath(sprintf('.//a[substring(@href, string-length(@href) - string-length(%1$s) + 1)=%1$s]', Crawler::xpathLiteral($url)));
568+
$crawler = $crawler->filterXPath(
569+
sprintf('.//a[substring(@href, string-length(@href) - string-length(%1$s) + 1)=%1$s]',
570+
Crawler::xpathLiteral($url))
571+
);
569572
if ($crawler->count() > 0) {
570573
$this->fail("Link containing text '$text' and URL '$url' was found in page " . $this->_getCurrentUri());
571574
}

0 commit comments

Comments
 (0)
0