Skip to content

Commit 5a34d19

Browse files
committed
Fix deprecated API usage
1 parent e570aa2 commit 5a34d19

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/InterNations/Component/Testing/DomCrawlerAssertionTrait.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ protected static function assertHtmlSelector(
1313
string $message = ''
1414
): void
1515
{
16-
self::assertSame($expected, (new Crawler($document))->filter($selector)->text(), $message);
16+
self::assertSame($expected, (new Crawler($document))->filter($selector)->text(null, true), $message);
1717
}
1818

1919
protected static function assertNotHtmlSelector(
@@ -24,7 +24,7 @@ protected static function assertNotHtmlSelector(
2424
): void
2525
{
2626
try {
27-
$value = (new Crawler($document))->filter($selector)->text();
27+
$value = (new Crawler($document))->filter($selector)->text(null, true);
2828
} catch (InvalidArgumentException $e) {
2929
$value = '';
3030
}
@@ -38,7 +38,7 @@ protected static function assertHtmlSelectorContains(
3838
string $message = ''
3939
): void
4040
{
41-
self::assertContains($expected, (new Crawler($document))->filter($selector)->text(), $message);
41+
self::assertContains($expected, (new Crawler($document))->filter($selector)->text(null, true), $message);
4242
}
4343

4444
protected static function assertNotHtmlSelectorContains(
@@ -49,7 +49,7 @@ protected static function assertNotHtmlSelectorContains(
4949
): void
5050
{
5151
try {
52-
$value = (new Crawler($document))->filter($selector)->text();
52+
$value = (new Crawler($document))->filter($selector)->text(null, true);
5353
} catch (InvalidArgumentException $e) {
5454
$value = '';
5555
}
@@ -101,7 +101,7 @@ protected static function assertXpathSelector(
101101
string $message = ''
102102
): void
103103
{
104-
self::assertSame($expected, (new Crawler($document))->filterXPath($xpath)->text(), $message);
104+
self::assertSame($expected, (new Crawler($document))->filterXPath($xpath)->text(null, true), $message);
105105
}
106106

107107
protected static function assertNotXpathSelector(
@@ -112,7 +112,7 @@ protected static function assertNotXpathSelector(
112112
): void
113113
{
114114
try {
115-
$value = (new Crawler($document))->filterXPath($xpath)->text();
115+
$value = (new Crawler($document))->filterXPath($xpath)->text(null, true);
116116
} catch (InvalidArgumentException $e) {
117117
$value = '';
118118
}
@@ -126,7 +126,7 @@ protected static function assertXpathSelectorContains(
126126
string $message = ''
127127
): void
128128
{
129-
self::assertContains($expected, (new Crawler($document))->filterXPath($xpath)->text(), $message);
129+
self::assertContains($expected, (new Crawler($document))->filterXPath($xpath)->text(null, true), $message);
130130
}
131131

132132
protected static function assertNotXpathSelectorContains(
@@ -137,7 +137,7 @@ protected static function assertNotXpathSelectorContains(
137137
): void
138138
{
139139
try {
140-
$value = (new Crawler($document))->filterXPath($xpath)->text();
140+
$value = (new Crawler($document))->filterXPath($xpath)->text(null, true);
141141
} catch (InvalidArgumentException $e) {
142142
$value = '';
143143
}

0 commit comments

Comments
 (0)