Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ritaswc committed May 10, 2021
1 parent edb2c97 commit dc8b60c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ php:
- '7.3'
- '7.4'
install:
- COMPOSER=composer-phpunit.json composer install
- composer install
script:
- ./vendor/bin/phpunit
21 changes: 0 additions & 21 deletions composer-phpunit.json

This file was deleted.

3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
"require": {
"php": ">=5.6"
},
"require-dev": {
"phpunit/phpunit": "*"
},
"autoload": {
"psr-4": {
"Ritaswc\\ZxIPAddress\\": "src/ZxIPAddress"
Expand Down
3 changes: 2 additions & 1 deletion tests/IPv6Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public function testQuery()
$arr = IPv6Tool::query('FFFF:FFFF:FFFF:FFFF::');
$this->assertEquals('ffff:ffff:ffff:fff0::', $arr['start']);
$this->assertEquals('ffff:ffff:ffff:ffff::', $arr['end']);
$this->assertEquals('ZX公网IPv6库', $arr['addr'][0]);
$this->assertEquals('', $arr['addr'][0]);
$this->assertEquals('ZX公网IPv6库 20210510版', $arr['addr'][1]);
try {
IPv6Tool::query('2409::e7ef::76c9');
} catch (\Exception $exception) {
Expand Down

0 comments on commit dc8b60c

Please sign in to comment.