示例#1
0
 /**
  * Creates and returns this test suite
  *
  * @return PHPUnit_Framework_TestSuite
  */
 public static function suite()
 {
     $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Service_Amazon');
     $suite->addTestSuite('Zend_Service_Amazon_OfflineTest');
     if (defined('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ENABLED') && constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ENABLED') && defined('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID')) {
         $suite->addTestSuite('Zend_Service_Amazon_OnlineTest');
     } else {
         $suite->addTestSuite('Zend_Service_Amazon_OnlineTest_Skip');
     }
     $suite->addTest(Zend_Service_Amazon_S3_AllTests::suite());
     return $suite;
 }
示例#2
0
文件: AllTests.php 项目: netvlies/zf
    /**
     * Runs this test suite
     *
     * @return void
     */
    public static function main()
    {
        PHPUnit_TextUI_TestRunner::run(self::suite());
    }
    /**
     * Creates and returns this test suite
     *
     * @return PHPUnit_Framework_TestSuite
     */
    public static function suite()
    {
        $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Service_Amazon_S3');
        $suite->addTestSuite('Zend_Service_Amazon_S3_OfflineTest');
        if (defined('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ENABLED') && constant('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ENABLED') && defined('TESTS_ZEND_SERVICE_AMAZON_ONLINE_ACCESSKEYID') && defined('TESTS_ZEND_SERVICE_AMAZON_ONLINE_SECRETKEY')) {
            $suite->addTestSuite('Zend_Service_Amazon_S3_OnlineTest');
            $suite->addTestSuite('Zend_Service_Amazon_S3_StreamTest');
        } else {
            $suite->addTestSuite('Zend_Service_Amazon_S3_StreamTest_Skip');
            $suite->addTestSuite('Zend_Service_Amazon_S3_OnlineTest_Skip');
        }
        return $suite;
    }
}
if (PHPUnit_MAIN_METHOD == 'Zend_Service_Amazon_S3_AllTests::main') {
    Zend_Service_Amazon_S3_AllTests::main();
}