Skip to content

Commit 162d869

Browse files
committed
Merge pull request googleapis#134 from ithinkihaveacat/travis-support
Automatically run tests on Travis CI
2 parents d217363 + 06ed423 commit 162d869

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
language: php
2+
3+
php:
4+
# Can't test against 5.2; openssl is not available:
5+
# http://docs.travis-ci.com/user/languages/php/#PHP-installation
6+
- 5.3
7+
- 5.4
8+
- 5.5
9+
10+
before_script:
11+
- composer install
12+
13+
script:
14+
- cd tests ; phpunit .

tests/pagespeed/PageSpeedTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public function __construct() {
2525
}
2626

2727
public function testPageSpeed() {
28+
$this->checkToken();
2829
$psapi = $this->service->pagespeedapi;
2930
$result = $psapi->runpagespeed('http://code.google.com');
3031
$this->assertArrayHasKey('kind', $result);

tests/plus/PlusTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function __construct() {
3535
}
3636

3737
public function testGetPerson() {
38+
$this->checkToken();
3839
$person = $this->plus->people->get("118051310819094153327");
3940
$this->assertArrayHasKey('kind', $person);
4041
$this->assertArrayHasKey('displayName', $person);
@@ -43,6 +44,7 @@ public function testGetPerson() {
4344
}
4445

4546
public function testListActivities() {
47+
$this->checkToken();
4648
$activities = $this->plus->activities
4749
->listActivities("118051310819094153327", "public");
4850

0 commit comments

Comments
 (0)