Skip to content

Commit 3f64c5f

Browse files
committed
Fix assert with selector count
1 parent de4a0cb commit 3f64c5f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/Application/src/Tests/Controller/SubscriptionUiTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ public function it_allows_browsing_subscriptions(): void
4848
$content = $response->getContent();
4949

5050
// only 5 subscriptions
51-
$this->assertSelectorCount(5, 'tbody tr');
51+
if (method_exists($this, 'assertSelectorCount')) {
52+
$this->assertSelectorCount(5, 'tbody tr');
53+
}
5254

5355
$this->assertStringContainsString('<td>[email protected]</td>', $content);
5456
$this->assertStringContainsString(sprintf('<a href="/admin/subscriptions/%s">Show</a>', $subscriptions['subscription_doc']->getId()), $content);
@@ -72,7 +74,9 @@ public function it_allows_browsing_subscriptions_with_page_limit(): void
7274
$this->assertResponseCode($response, Response::HTTP_OK);
7375

7476
// only 2 subscriptions
75-
$this->assertSelectorCount(3, 'tbody tr');
77+
if (method_exists($this, 'assertSelectorCount')) {
78+
$this->assertSelectorCount(3, 'tbody tr');
79+
}
7680
}
7781

7882
/** @test */
@@ -86,7 +90,9 @@ public function it_allows_browsing_subscriptions_with_grid_limits(): void
8690
$this->assertResponseCode($response, Response::HTTP_OK);
8791

8892
// only 5 subscriptions
89-
$this->assertSelectorCount(5, 'tbody tr');
93+
if (method_exists($this, 'assertSelectorCount')) {
94+
$this->assertSelectorCount(5, 'tbody tr');
95+
}
9096
}
9197

9298
/** @test */

0 commit comments

Comments
 (0)