1111
1212namespace Zenstruck \ScheduleBundle \Tests \Schedule \Extension ;
1313
14+ use PHPUnit \Framework \MockObject \Builder \InvocationMocker ;
1415use PHPUnit \Framework \TestCase ;
1516use Symfony \Contracts \HttpClient \HttpClientInterface ;
1617use Zenstruck \ScheduleBundle \Schedule ;
@@ -30,6 +31,11 @@ final class PingExtensionTest extends TestCase
3031 */
3132 public function success_webhooks_are_pinged ()
3233 {
34+ // todo find better solution
35+ if (!\method_exists (InvocationMocker::class, 'withConsecutive ' )) {
36+ $ this ->markTestSkipped ('Requires PHPUnit 9 ' );
37+ }
38+
3339 $ client = $ this ->createMock (HttpClientInterface::class);
3440 $ client ->expects ($ this ->exactly (6 ))->method ('request ' )->withConsecutive (
3541 [$ this ->equalTo ('GET ' ), $ this ->equalTo ('schedule-before.com ' ), $ this ->isType ('array ' )],
@@ -52,6 +58,11 @@ public function success_webhooks_are_pinged()
5258 */
5359 public function failure_webhooks_are_pinged ()
5460 {
61+ // todo find better solution
62+ if (!\method_exists (InvocationMocker::class, 'withConsecutive ' )) {
63+ $ this ->markTestSkipped ('Requires PHPUnit 9 ' );
64+ }
65+
5566 $ client = $ this ->createMock (HttpClientInterface::class);
5667 $ client ->expects ($ this ->exactly (6 ))->method ('request ' )->withConsecutive (
5768 [$ this ->equalTo ('GET ' ), $ this ->equalTo ('schedule-before.com ' ), $ this ->isType ('array ' )],
0 commit comments