File tree Expand file tree Collapse file tree 7 files changed +150
-0
lines changed Expand file tree Collapse file tree 7 files changed +150
-0
lines changed Original file line number Diff line number Diff line change 1+ ; This file is for unifying the coding style for different editors and IDEs.
2+ ; More information at http://editorconfig.org
3+
4+ root = true
5+
6+ [* ]
7+ charset = utf-8
8+ indent_size = 4
9+ indent_style = space
10+ end_of_line = lf
11+ insert_final_newline = true
12+ trim_trailing_whitespace = true
13+
14+ [* .md ]
15+ trim_trailing_whitespace = false
Original file line number Diff line number Diff line change 1+ /.idea
2+ /.DS_Store
3+ /vendor
4+ phpunit.xml
5+ composer.lock
Original file line number Diff line number Diff line change 1+ language : php
2+ php :
3+ - 7.1
4+ - 7.0
5+ - 5.6
6+ - 5.5
7+ install :
8+ - composer self-update
9+ - composer install --no-interaction
10+ script :
11+ - php vendor/bin/phpunit
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " aliyunapi/php-aliyun-open-api-cdn" ,
3+ "description" : " aliyunsdk" ,
4+ "keywords" : [
5+ " aliyun" ,
6+ " aliyun sdk" ,
7+ " aliyun"
8+ ],
9+ "type" : " library" ,
10+ "license" : " Apache" ,
11+ "support" : {
12+ "issues" : " https://github.com/aliyunapi/php-aliyun-open-api-cdn/issues" ,
13+ "source" : " https://github.com/aliyunapi/php-aliyun-open-api-cdn"
14+ },
15+ "authors" : [
16+ {
17+ "name" : " Xu TL" ,
18+ "email" : " xutongle@gmail.com"
19+ }
20+ ],
21+ "require" : {
22+ "php" : " >=5.5.0" ,
23+ "aliyunapi/php-aliyun-open-api-cdn" : " ~1.0 | dev-master"
24+ },
25+ "require-dev" : {
26+ "phpunit/phpunit" : " 4.*"
27+ },
28+ "autoload" : {
29+ "psr-4" : {
30+ "aliyun\\ cdn\\ " : " src"
31+ }
32+ },
33+ "autoload-dev" : {
34+ "psr-4" : {
35+ "aliyun\\ test\\ cdn\\ " : " tests"
36+ }
37+ },
38+ "scripts" : {
39+ "test" : " phpunit"
40+ }
41+ }
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <phpunit bootstrap =" ./tests/bootstrap.php"
3+ colors=" true"
4+ convertErrorsToExceptions=" true"
5+ convertNoticesToExceptions=" true"
6+ convertWarningsToExceptions=" true"
7+ stopOnFailure=" false" >
8+ <testsuites >
9+ <testsuite name =" Aliyun Test Suite" >
10+ <directory >./tests</directory >
11+ </testsuite >
12+ </testsuites >
13+ </phpunit >
Original file line number Diff line number Diff line change 1+ <?php
2+ /*
3+ * Licensed to the Apache Software Foundation (ASF) under one
4+ * or more contributor license agreements. See the NOTICE file
5+ * distributed with this work for additional information
6+ * regarding copyright ownership. The ASF licenses this file
7+ * to you under the Apache License, Version 2.0 (the
8+ * "License"); you may not use this file except in compliance
9+ * with the License. You may obtain a copy of the License at
10+ *
11+ * http://www.apache.org/licenses/LICENSE-2.0
12+ *
13+ * Unless required by applicable law or agreed to in writing,
14+ * software distributed under the License is distributed on an
15+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+ * KIND, either express or implied. See the License for the
17+ * specific language governing permissions and limitations
18+ * under the License.
19+ */
20+ namespace aliyun \test ;
21+
22+ use aliyun \core \Client ;
23+
24+ use aliyun \core \profile \DefaultProfile ;
25+
26+ class TestCase extends \PHPUnit_Framework_TestCase
27+ {
28+
29+ public $ client = null ;
30+
31+ function setUp ()
32+ {
33+ $ iClientProfile = DefaultProfile::getProfile ("cn-hangzhou " , "5slyhuy4sv30bmppvgew0rps " , "NGYL1I7hXC6SgSqkcE5DJdPgJM8= " );
34+ $ this ->client = new Client ($ iClientProfile );
35+ }
36+
37+
38+ function getProperty ($ propertyKey )
39+ {
40+ $ accessKey = "" ;
41+ $ accessSecret = "" ;
42+ $ iClientProfile = DefaultProfile::getProfile ("cn-hangzhou " , "5slyhuy4sv30bmppvgew0rps " , "NGYL1I7hXC6SgSqkcE5DJdPgJM8= " );
43+ }
44+
45+ }
Original file line number Diff line number Diff line change 1+ <?php
2+ use aliyun \core \regions \Endpoint ;
3+ use aliyun \core \regions \EndpointConfig ;
4+ use aliyun \core \regions \EndpointProvider ;
5+
6+ // ensure we get report on all possible php errors
7+ error_reporting (-1 );
8+ // require composer autoloader if available
9+ $ composerAutoload = __DIR__ . '/../vendor/autoload.php ' ;
10+ if (is_file ($ composerAutoload )) {
11+ require_once ($ composerAutoload );
12+ }
13+
14+ /**
15+ * 配置网关
16+ */
17+ $ endpoint = new Endpoint ('cn-hangzhou ' , EndpointConfig::getRegionIds (), EndpointConfig::getProductDomains ());
18+ EndpointProvider::setEndpoints ([ $ endpoint ]);
19+
20+ require_once (__DIR__ . '/TestCase.php ' );
You can’t perform that action at this time.
0 commit comments