@@ -314,7 +314,7 @@ public function testThrowsResourceUnavailableExceptionIfFailResponseCachedInFall
314
314
$ spaces = array_merge_recursive ($ this ->spaces , ['test ' => ['cache ' => $ frontCachePool , 'fallback_cache ' => $ fallbackCachePool ]]);
315
315
$ contentful = $ this ->getContentful ($ spaces , array_merge ($ this ->options , $ handlerOption ));
316
316
$ parameters = [new LessThanFilter (new FieldProperty ('ghosts ' ), 6 ), new EqualFilter (new FieldProperty ('old ' ), 6 )];
317
- $ this ->setExpectedException ( ' Markup\Contentful\Exception\ ResourceUnavailableException' );
317
+ $ this ->expectException ( ResourceUnavailableException::class );
318
318
$ contentful ->getEntries ($ parameters );
319
319
}
320
320
@@ -340,7 +340,7 @@ public function testFailResponseDoesNotSaveIntoFallbackCacheEvenIfCachingFailRes
340
340
$ spaces = array_merge_recursive ($ this ->spaces , ['test ' => ['cache ' => $ frontCachePool , 'fallback_cache ' => $ fallbackCachePool ]]);
341
341
$ contentful = $ this ->getContentful ($ spaces , array_merge ($ this ->options , $ handlerOption , ['cache_fail_responses ' => true ]));
342
342
$ parameters = [new LessThanFilter (new FieldProperty ('ghosts ' ), 6 ), new EqualFilter (new FieldProperty ('old ' ), 6 )];
343
- $ this ->setExpectedException ( ' Markup\Contentful\Exception\ ResourceUnavailableException' );
343
+ $ this ->expectException ( ResourceUnavailableException::class );
344
344
$ contentful ->getEntries ($ parameters );
345
345
}
346
346
@@ -408,7 +408,7 @@ public function testInvalidResponseDoesNotSaveIntoFallbackCacheEvenIfCachingFail
408
408
$ spaces = array_merge_recursive ($ this ->spaces , ['test ' => ['cache ' => $ frontCachePool , 'fallback_cache ' => $ fallbackCachePool ]]);
409
409
$ contentful = $ this ->getContentful ($ spaces , array_merge ($ this ->options , $ handlerOption , ['cache_fail_responses ' => true ]));
410
410
$ parameters = [new LessThanFilter (new FieldProperty ('ghosts ' ), 6 ), new EqualFilter (new FieldProperty ('old ' ), 6 )];
411
- $ this ->setExpectedException ( ' Markup\Contentful\Exception\ ResourceUnavailableException' );
411
+ $ this ->expectException ( ResourceUnavailableException::class );
412
412
$ contentful ->getEntries ($ parameters , null , [
413
413
'test ' => function ($ builtResponse ) {
414
414
if (!$ builtResponse instanceof ResourceArray) {
@@ -538,7 +538,7 @@ public function testGetNonExistentResourceWhenCachedThrowsWithoutRequest()
538
538
$ spaces = array_merge_recursive ($ this ->spaces , ['test ' => ['cache ' => $ cachePool , 'preview_mode ' => false ]]);
539
539
$ handlerOption = $ this ->getExplodyHandlerOption ();
540
540
$ contentful = $ this ->getContentful ($ spaces , array_merge ($ this ->options , $ handlerOption , ['cache_fail_responses ' => true ]));
541
- $ this ->setExpectedException (ResourceUnavailableException::class);
541
+ $ this ->expectException (ResourceUnavailableException::class);
542
542
$ contentful ->getEntry ('cat ' );
543
543
}
544
544
0 commit comments