forked from zhuzhichao/ip-location-zh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
146b47b
commit f318d80
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
language: php | ||
|
||
php: | ||
# using major version aliases | ||
|
||
# aliased to a recent 5.4.x version | ||
- 5.4 | ||
# aliased to a recent 5.5.x version | ||
- 5.5 | ||
# aliased to a recent 5.6.x version | ||
- 5.6 | ||
# hhvm | ||
- hhvm | ||
|
||
before_script: | ||
- composer self-update | ||
- composer install --prefer-source --no-interaction --dev | ||
|
||
script: phpunit ./tests/*.php | ||
|
||
matrix: | ||
fast_finish: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
require __DIR__.'/../vendor/autoload.php'; | ||
use Zhuzhichao\IpLocationZh\Ip; | ||
|
||
class TestIp extends PHPUnit_Framework_TestCase { | ||
public function testIpLocation() { | ||
$this->assertEquals(['中国', '河南', '郑州', ''], Ip::find('1.192.94.203')); | ||
$this->assertEquals(['中国', '浙江', '杭州', ''], Ip::find('110.75.115.70')); | ||
} | ||
} |