diff --git a/tests/application/modules/opac/controllers/NoticeAjaxControllerTest.php b/tests/application/modules/opac/controllers/NoticeAjaxControllerTest.php index 4891bab27b72afd7c534f69e2c1e7f9b7204a92d..7846b2ec94e5289410a7b238ca0a76b62c557b2e 100644 --- a/tests/application/modules/opac/controllers/NoticeAjaxControllerTest.php +++ b/tests/application/modules/opac/controllers/NoticeAjaxControllerTest.php @@ -472,10 +472,12 @@ class NoticeAjaxControllerBandeAnnonceTest extends AbstractControllerTestCase { /** @test */ public function harryPotterWith410DollarVShouldFindTrailer() { + $key = Class_WebService_AllServices::createSecurityKey(); + Class_WebService_AllServices::setHttpClient( Storm_Test_ObjectWrapper::mock() ->whenCalled('open_url') - ->with('https://websvc.afi-sa.net/afi_opac_services/main.php?titre=Harry+Potter+%C3%A0+l%27%C3%A9cole+des+sorciers&auteur=Chris+Columbus&width=500&height=400&src=410350b202bee843de4619ce5e819202&api=2.0&action=6') + ->with('https://websvc.afi-sa.net/afi_opac_services/main.php?titre=Harry+Potter+%C3%A0+l%27%C3%A9cole+des+sorciers&auteur=Chris+Columbus&width=500&height=400&src=' . $key . '&api=2.0&action=6') ->answers(json_encode(['source' => 'CommeAuCinema', 'player' => '<iframe></iframe>'])) ->beStrict());