@@ -292,7 +292,7 @@ class IntegrationEvaluatorTest extends UnitTestCase
292292 function test_getMatchedIntegrationConfig_OneTrigger_And_NotMatched ()
293293 {
294294 $ request = new HttpRequestProviderMock ();
295- $ request ->cookieManager = new CookieManagerMock ();
295+ $ request ->cookieManager = new IntegrationConfigHelpersCookieManagerMock ();
296296 $ integrationConfig = array (
297297 "Integrations " =>array (
298298 array (
@@ -333,7 +333,7 @@ function test_getMatchedIntegrationConfig_OneTrigger_And_NotMatched()
333333 function test_getMatchedIntegrationConfig_OneTrigger_And_Matched ()
334334 {
335335 $ request = new HttpRequestProviderMock ();
336- $ request ->cookieManager = new CookieManagerMock ();
336+ $ request ->cookieManager = new IntegrationConfigHelpersCookieManagerMock ();
337337 $ request ->cookieManager ->cookieArray = array ("c2 " =>"ddd " ,"c1 " =>"Value1 " );
338338
339339 $ integrationConfig = array (
@@ -370,14 +370,14 @@ function test_getMatchedIntegrationConfig_OneTrigger_And_Matched()
370370 $ url = "http://test.tesdomain.com:8080/test?q=2 " ;
371371 $ testObject = new QueueIT \KnownUserV3 \SDK \IntegrationEvaluator ();
372372
373- $ this -> assertTrue ( $ testObject ->getMatchedIntegrationConfig ($ integrationConfig ,
374- $ url , $ request ) ["Name " ]==="integration1 " );
373+ $ result = $ testObject ->getMatchedIntegrationConfig ($ integrationConfig , $ url , $ request );
374+ $ this -> assertTrue ( $ result ["Name " ]==="integration1 " );
375375 }
376376
377377 function test_getMatchedIntegrationConfig_OneTrigger_And_NotMatched_UserAgent ()
378378 {
379379 $ request = new HttpRequestProviderMock ();
380- $ request ->cookieManager = new CookieManagerMock ();
380+ $ request ->cookieManager = new IntegrationConfigHelpersCookieManagerMock ();
381381 $ request ->cookieManager ->cookieArray = array ("c2 " =>"ddd " ,"c1 " =>"Value1 " );
382382 $ request ->userAgent = "bot.html google.com googlebot test " ;
383383 $ integrationConfig = array (
@@ -428,7 +428,7 @@ function test_getMatchedIntegrationConfig_OneTrigger_And_NotMatched_UserAgent()
428428 function test_getMatchedIntegrationConfig_OneTrigger_And_NotMatched_HttpHeader ()
429429 {
430430 $ request = new HttpRequestProviderMock ();
431- $ request ->cookieManager = new CookieManagerMock ();
431+ $ request ->cookieManager = new IntegrationConfigHelpersCookieManagerMock ();
432432 $ request ->cookieManager ->cookieArray = array ("c2 " =>"ddd " ,"c1 " =>"Value1 " );
433433 $ request ->headerArray = array ("c1 " =>"t1 " ,"headertest " =>"abcd efg test gklm " );
434434
@@ -481,7 +481,7 @@ function test_getMatchedIntegrationConfig_OneTrigger_And_NotMatched_HttpHeader()
481481 function test_getMatchedIntegrationConfig_OneTrigger_Or_NotMatched ()
482482 {
483483 $ request = new HttpRequestProviderMock ();
484- $ request ->cookieManager = new CookieManagerMock ();
484+ $ request ->cookieManager = new IntegrationConfigHelpersCookieManagerMock ();
485485 $ integrationConfig = array (
486486 "Integrations " =>array (
487487 array (
@@ -524,7 +524,7 @@ function test_getMatchedIntegrationConfig_OneTrigger_Or_NotMatched()
524524 function test_getMatchedIntegrationConfig_OneTrigger_Or_Matched ()
525525 {
526526 $ request = new HttpRequestProviderMock ();
527- $ request ->cookieManager = new CookieManagerMock ();
527+ $ request ->cookieManager = new IntegrationConfigHelpersCookieManagerMock ();
528528 $ integrationConfig = array (
529529 "Integrations " =>array (
530530 array (
@@ -559,14 +559,14 @@ function test_getMatchedIntegrationConfig_OneTrigger_Or_Matched()
559559 $ url = "http://test.tesdomain.com:8080/test?q=2 " ;
560560 $ testObject = new QueueIT \KnownUserV3 \SDK \IntegrationEvaluator ();
561561
562- $ this -> assertTrue ( $ testObject ->getMatchedIntegrationConfig ($ integrationConfig ,
563- $ url , $ request ) ["Name " ]==="integration1 " );
562+ $ result = $ testObject ->getMatchedIntegrationConfig ($ integrationConfig , $ url , $ request );
563+ $ this -> assertTrue ( $ result ["Name " ]==="integration1 " );
564564
565565 }
566566 function test_getMatchedIntegrationConfig_TwoTriggers_Matched ()
567567 {
568568 $ request = new HttpRequestProviderMock ();
569- $ request ->cookieManager = new CookieManagerMock ();
569+ $ request ->cookieManager = new IntegrationConfigHelpersCookieManagerMock ();
570570 $ integrationConfig = array (
571571 "Integrations " =>array (
572572
@@ -616,13 +616,14 @@ function test_getMatchedIntegrationConfig_TwoTriggers_Matched()
616616 $ url = "http://test.tesdomain.com:8080/test?q=2 " ;
617617 $ testObject = new QueueIT \KnownUserV3 \SDK \IntegrationEvaluator ();
618618
619- $ this ->assertTrue ($ testObject ->getMatchedIntegrationConfig ($ integrationConfig , $ url ,$ request )["Name " ]=="integration1 " );
619+ $ result = $ testObject ->getMatchedIntegrationConfig ($ integrationConfig , $ url ,$ request );
620+ $ this ->assertTrue ($ result ["Name " ]=="integration1 " );
620621
621622 }
622623 function test_getMatchedIntegrationConfig_ThreeIntegrationsInOrder_SecondMatched ()
623624 {
624625 $ request = new HttpRequestProviderMock ();
625- $ request ->cookieManager = new CookieManagerMock ();
626+ $ request ->cookieManager = new IntegrationConfigHelpersCookieManagerMock ();
626627 $ integrationConfig = array (
627628 "Integrations " =>array (
628629 array (
@@ -686,7 +687,8 @@ function test_getMatchedIntegrationConfig_ThreeIntegrationsInOrder_SecondMatched
686687 $ url = "http://test.tesdomain.com:8080/test?q=2 " ;
687688 $ testObject = new QueueIT \KnownUserV3 \SDK \IntegrationEvaluator ();
688689
689- $ this ->assertTrue ($ testObject ->getMatchedIntegrationConfig ($ integrationConfig ,$ url ,$ request )["Name " ]=="integration1 " );
690+ $ result = $ testObject ->getMatchedIntegrationConfig ($ integrationConfig ,$ url ,$ request );
691+ $ this ->assertTrue ($ result ["Name " ]=="integration1 " );
690692 }
691693
692694}
@@ -717,7 +719,7 @@ public function getHeaderArray() {
717719 }
718720}
719721
720- class CookieManagerMock implements QueueIT \KnownUserV3 \SDK \ICookieManager
722+ class IntegrationConfigHelpersCookieManagerMock implements QueueIT \KnownUserV3 \SDK \ICookieManager
721723{
722724 public $ debugInfoCookie ;
723725 public $ cookieArray ;
0 commit comments