diff --git a/lib/unitTest/Bridge/Api/Youtube/Bridge_Api_Youtube_ContainerTest.php b/lib/unitTest/Bridge/Api/Youtube/Bridge_Api_Youtube_ContainerTest.php index 1742616f65..c7d3b0283a 100644 --- a/lib/unitTest/Bridge/Api/Youtube/Bridge_Api_Youtube_ContainerTest.php +++ b/lib/unitTest/Bridge/Api/Youtube/Bridge_Api_Youtube_ContainerTest.php @@ -3,9 +3,12 @@ require_once __DIR__ . '/../../../PhraseanetPHPUnitAuthenticatedAbstract.class.inc'; require_once __DIR__ . '/../../Bridge_datas.inc'; -$new_include_path = realpath(__DIR__ . '/../../../../vendor/gdata/') . PATH_SEPARATOR . get_include_path(); -set_include_path($new_include_path); - +$include_path = realpath(__DIR__ . '/../../../../vendor/gdata/'); +if(strpos(get_include_path(), $include_path) === false) +{ + $new_include_path = $include_path . PATH_SEPARATOR . get_include_path(); + set_include_path($new_include_path); +} require_once('Zend/Loader.php'); Zend_Loader::loadClass('Zend_Gdata_YouTube'); diff --git a/lib/unitTest/Bridge/Api/Youtube/Bridge_Api_Youtube_ElementTest.php b/lib/unitTest/Bridge/Api/Youtube/Bridge_Api_Youtube_ElementTest.php index 08fe46adfe..295d667f13 100644 --- a/lib/unitTest/Bridge/Api/Youtube/Bridge_Api_Youtube_ElementTest.php +++ b/lib/unitTest/Bridge/Api/Youtube/Bridge_Api_Youtube_ElementTest.php @@ -3,9 +3,12 @@ require_once __DIR__ . '/../../../PhraseanetPHPUnitAuthenticatedAbstract.class.inc'; require_once __DIR__ . '/../../Bridge_datas.inc'; -$new_include_path = realpath(__DIR__ . '/../../../../vendor/gdata/') . PATH_SEPARATOR . get_include_path(); -set_include_path($new_include_path); - +$include_path = realpath(__DIR__ . '/../../../../vendor/gdata/'); +if(strpos(get_include_path(), $include_path) === false) +{ + $new_include_path = $include_path . PATH_SEPARATOR . get_include_path(); + set_include_path($new_include_path); +} require_once('Zend/Loader.php'); Zend_Loader::loadClass('Zend_Gdata_YouTube'); diff --git a/lib/unitTest/Bridge/Bridge_datas.inc b/lib/unitTest/Bridge/Bridge_datas.inc index 9506fb51e4..e6fec4eac5 100644 --- a/lib/unitTest/Bridge/Bridge_datas.inc +++ b/lib/unitTest/Bridge/Bridge_datas.inc @@ -2,8 +2,12 @@ require_once __DIR__ . '/../../bootstrap.php'; -$new_include_path = realpath(__DIR__ . "/../../vendor/") . PATH_SEPARATOR . get_include_path(); -set_include_path($new_include_path); +$include_path = realpath(__DIR__ . '/../../vendor/'); +if(strpos(get_include_path(), $include_path) === false) +{ + $new_include_path = $include_path . PATH_SEPARATOR . get_include_path(); + set_include_path($new_include_path); +} require_once __DIR__ . "/../../vendor/Phlickr/Api.php";