1010use Ibexa \Contracts \Core \Persistence \Content \ContentInfo ;
1111use Ibexa \Contracts \Core \Persistence \Content \CreateStruct ;
1212use Ibexa \Contracts \Core \Persistence \Content \Handler as SPIContentHandler ;
13- use Ibexa \Contracts \Core \Persistence \Content \Location \Handler as SPILocationHandler ;
13+ use Ibexa \Contracts \Core \Persistence \Content \Location \Handler as PersistenceLocationHandler ;
1414use Ibexa \Contracts \Core \Persistence \Content \MetadataUpdateStruct ;
1515use Ibexa \Contracts \Core \Persistence \Content \Relation ;
1616use Ibexa \Contracts \Core \Persistence \Content \Relation as SPIRelation ;
@@ -444,7 +444,7 @@ public function testUpdateContent(): void
444444 $ this ->loggerMock ->expects ($ this ->once ())->method ('logCall ' );
445445
446446 $ innerContentHandlerMock = $ this ->createMock (SPIContentHandler::class);
447- $ innerLocationHandlerMock = $ this ->createMock (SPILocationHandler ::class);
447+ $ innerLocationHandlerMock = $ this ->createMock (PersistenceLocationHandler ::class);
448448
449449 $ this ->prepareHandlerMocks (
450450 $ innerContentHandlerMock ,
@@ -455,39 +455,39 @@ public function testUpdateContent(): void
455455 );
456456
457457 $ innerContentHandlerMock
458- ->expects ($ this -> once ())
458+ ->expects (self :: once ())
459459 ->method ('updateContent ' )
460460 ->with (2 , 1 , new UpdateStruct ())
461461 ->willReturn (new Content ());
462462
463463 $ this ->cacheIdentifierGeneratorMock
464- ->expects ($ this -> exactly (5 ))
464+ ->expects (self :: exactly (5 ))
465465 ->method ('generateTag ' )
466- ->will (
467- self :: returnValueMap ( [
466+ ->willReturnMap (
467+ [
468468 ['location ' , [3 ], false , 'l-3 ' ],
469469 ['location ' , [4 ], false , 'l-4 ' ],
470470 ['location_path ' , [3 ], false , 'lp-3 ' ],
471471 ['location_path ' , [4 ], false , 'lp-4 ' ],
472472 ['content_version ' , [2 , 1 ], false , 'c-2-v-1 ' ],
473- ])
473+ ]
474474 );
475475
476476 $ this ->cacheMock
477- ->expects ($ this -> once ())
477+ ->expects (self :: once ())
478478 ->method ('invalidateTags ' )
479479 ->with (['l-3 ' , 'l-4 ' , 'lp-3 ' , 'lp-4 ' , 'c-2-v-1 ' ]);
480480
481481 $ handler = $ this ->persistenceCacheHandler ->contentHandler ();
482482 $ handler ->updateContent (2 , 1 , new UpdateStruct ());
483483 }
484484
485- public function testDeleteContent ()
485+ public function testDeleteContent (): void
486486 {
487- $ this ->loggerMock ->expects ($ this -> once ())->method ('logCall ' );
487+ $ this ->loggerMock ->expects (self :: once ())->method ('logCall ' );
488488
489489 $ innerContentHandlerMock = $ this ->createMock (SPIContentHandler::class);
490- $ innerLocationHandlerMock = $ this ->createMock (SPILocationHandler ::class);
490+ $ innerLocationHandlerMock = $ this ->createMock (PersistenceLocationHandler ::class);
491491
492492 $ this ->prepareHandlerMocks (
493493 $ innerContentHandlerMock ,
@@ -496,17 +496,17 @@ public function testDeleteContent()
496496 );
497497
498498 $ innerContentHandlerMock
499- ->expects ($ this -> once ())
499+ ->expects (self :: once ())
500500 ->method ('deleteContent ' )
501501 ->with (2 )
502502 ->willReturn (true );
503503
504504 $ this ->cacheMock
505- ->expects ($ this -> never ())
505+ ->expects (self :: never ())
506506 ->method ('deleteItem ' );
507507
508508 $ this ->cacheIdentifierGeneratorMock
509- ->expects ($ this -> exactly (4 ))
509+ ->expects (self :: exactly (4 ))
510510 ->method ('generateTag ' )
511511 ->withConsecutive (
512512 ['content ' , [42 ], false ],
@@ -517,7 +517,7 @@ public function testDeleteContent()
517517 ->willReturnOnConsecutiveCalls ('c-42 ' , 'c-2 ' , 'l-3 ' , 'l-4 ' );
518518
519519 $ this ->cacheMock
520- ->expects ($ this -> once ())
520+ ->expects (self :: once ())
521521 ->method ('invalidateTags ' )
522522 ->with (['c-42 ' , 'c-2 ' , 'l-3 ' , 'l-4 ' ]);
523523
@@ -531,19 +531,19 @@ public function testDeleteContent()
531531 */
532532 private function prepareHandlerMocks (
533533 SPIContentHandler $ innerContentHandlerMock ,
534- SPILocationHandler $ innerLocationHandlerMock ,
534+ PersistenceLocationHandler $ innerLocationHandlerMock ,
535535 int $ contentHandlerCount = 1 ,
536536 int $ locationHandlerCount = 1 ,
537537 int $ loadReverseRelationsCount = 1 ,
538538 int $ loadLocationsByContentCount = 1
539539 ): void {
540540 $ this ->persistenceHandlerMock
541- ->expects ($ this -> exactly ($ contentHandlerCount ))
541+ ->expects (self :: exactly ($ contentHandlerCount ))
542542 ->method ('contentHandler ' )
543543 ->willReturn ($ innerContentHandlerMock );
544544
545545 $ innerContentHandlerMock
546- ->expects ($ this -> exactly ($ loadReverseRelationsCount ))
546+ ->expects (self :: exactly ($ loadReverseRelationsCount ))
547547 ->method ('loadReverseRelations ' )
548548 ->with (2 , APIRelation::FIELD | APIRelation::ASSET )
549549 ->willReturn (
@@ -553,12 +553,12 @@ private function prepareHandlerMocks(
553553 );
554554
555555 $ this ->persistenceHandlerMock
556- ->expects ($ this -> exactly ($ locationHandlerCount ))
556+ ->expects (self :: exactly ($ locationHandlerCount ))
557557 ->method ('locationHandler ' )
558558 ->willReturn ($ innerLocationHandlerMock );
559559
560560 $ innerLocationHandlerMock
561- ->expects ($ this -> exactly ($ loadLocationsByContentCount ))
561+ ->expects (self :: exactly ($ loadLocationsByContentCount ))
562562 ->method ('loadLocationsByContent ' )
563563 ->with (2 )
564564 ->willReturn (
0 commit comments