Forráskód Böngészése

Skip Zend_Service_ShortUrl tests if not enabled.

Rob Allen 12 éve
szülő
commit
4ee89379c9

+ 10 - 0
tests/TestConfiguration.php.dist

@@ -679,6 +679,16 @@ defined('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PUBLIC_KEY') || define('TESTS_ZEN
 defined('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PRIVATE_KEY') || define('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PRIVATE_KEY', 'private mailhide key');
 
 /**
+ * Zend_Service_ShortUrl tests
+ */
+defined('TESTS_ZEND_SERVICE_SHORTURL_BITLY_ENABLED') || define('TESTS_ZEND_SERVICE_SHORTURL_BITLY_ENABLED', false);
+defined('TESTS_ZEND_SERVICE_SHORTURL_ISGD_ENABLED') || define('TESTS_ZEND_SERVICE_SHORTURL_ISGD_ENABLED', false);
+defined('TESTS_ZEND_SERVICE_SHORTURL_JDEMCZ_ENABLED') || define('TESTS_ZEND_SERVICE_SHORTURL_JDEMCZ_ENABLED', false);
+defined('TESTS_ZEND_SERVICE_SHORTURL_METAMARKNET_ENABLED') || define('TESTS_ZEND_SERVICE_SHORTURL_METAMARKNET_ENABLED', false);
+defined('TESTS_ZEND_SERVICE_SHORTURL_TINYURL_ENABLED') || define('TESTS_ZEND_SERVICE_SHORTURL_TINYURL_ENABLED', false);
+
+
+/**
  * Zend_Service_Simpy tests
  */
 defined('TESTS_ZEND_SERVICE_SIMPY_ENABLED') || define('TESTS_ZEND_SERVICE_SIMPY_ENABLED', false);

+ 6 - 0
tests/Zend/Service/ShortUrl/BitLyTest.php

@@ -36,6 +36,12 @@ class Zend_Service_ShortUrl_BitLyTest extends PHPUnit_Framework_TestCase
      */
     public function setUp ()
     {
+        if (!defined('TESTS_ZEND_SERVICE_SHORTURL_BITLY_ENABLED')
+            || !constant('TESTS_ZEND_SERVICE_SHORTURL_BITLY_ENABLED')
+        ) {
+            $this->markTestSkipped('Testing Zend_Service_ShortUrl_BitLyTest only works when TESTS_ZEND_SERVICE_SHORTURL_BITLY_ENABLED is set.');
+        }
+        
         Zend_Service_Abstract::setHttpClient(new Zend_Http_Client());
     }
 

+ 6 - 0
tests/Zend/Service/ShortUrl/IsGdTest.php

@@ -42,6 +42,12 @@ class Zend_Service_ShortUrl_IsGdTest extends PHPUnit_Framework_TestCase
      */
     public function setUp ()
     {
+        if (!defined('TESTS_ZEND_SERVICE_SHORTURL_ISGD_ENABLED')
+            || !constant('TESTS_ZEND_SERVICE_SHORTURL_ISGD_ENABLED')
+        ) {
+            $this->markTestSkipped('Testing Zend_Service_ShortUrl_IsGdTest only works when TESTS_ZEND_SERVICE_SHORTURL_ISGD_ENABLED is set.');
+        }
+        
         Zend_Service_Abstract::setHttpClient(new Zend_Http_Client());
 
         $this->_s = new Zend_Service_ShortUrl_IsGd();

+ 6 - 0
tests/Zend/Service/ShortUrl/JdemCzTest.php

@@ -42,6 +42,12 @@ class Zend_Service_ShortUrl_JdemCzTest extends PHPUnit_Framework_TestCase
      */
     public function setUp ()
     {
+        if (!defined('TESTS_ZEND_SERVICE_SHORTURL_JDEMCZ_ENABLED')
+            || !constant('TESTS_ZEND_SERVICE_SHORTURL_JDEMCZ_ENABLED')
+        ) {
+            $this->markTestSkipped('Testing Zend_Service_ShortUrl_JdemCzTest only works when TESTS_ZEND_SERVICE_SHORTURL_JDEMCZ_ENABLED is set.');
+        }
+
         Zend_Service_Abstract::setHttpClient(new Zend_Http_Client());
 
         $this->_s = new Zend_Service_ShortUrl_JdemCz();

+ 6 - 0
tests/Zend/Service/ShortUrl/MetamarkNetTest.php

@@ -43,6 +43,12 @@ class Zend_Service_ShortUrl_MetamarkNetTest extends PHPUnit_Framework_TestCase
      */
     public function setUp ()
     {
+        if (!defined('TESTS_ZEND_SERVICE_SHORTURL_METAMARKNET_ENABLED')
+            || !constant('TESTS_ZEND_SERVICE_SHORTURL_METAMARKNET_ENABLED')
+        ) {
+            $this->markTestSkipped('Testing Zend_Service_ShortUrl_MetamarkNetTest only works when TESTS_ZEND_SERVICE_SHORTURL_METAMARKNET_ENABLED is set.');
+        }
+
         Zend_Service_Abstract::setHttpClient(new Zend_Http_Client());
 
         $this->_s = new Zend_Service_ShortUrl_MetamarkNet();

+ 6 - 0
tests/Zend/Service/ShortUrl/TinyUrlComTest.php

@@ -42,6 +42,12 @@ class Zend_Service_ShortUrl_TinyUrlComTest extends PHPUnit_Framework_TestCase
      */
     public function setUp ()
     {
+        if (!defined('TESTS_ZEND_SERVICE_SHORTURL_TINYURL_ENABLED')
+            || !constant('TESTS_ZEND_SERVICE_SHORTURL_TINYURL_ENABLED')
+        ) {
+            $this->markTestSkipped('Testing Zend_Service_ShortUrl_TinyUrlComTest only works when TESTS_ZEND_SERVICE_SHORTURL_TINYURL_ENABLED is set.');
+        }
+        
         Zend_Service_Abstract::setHttpClient(new Zend_Http_Client());
 
         $this->_s = new Zend_Service_ShortUrl_TinyUrlCom();