Skip to content

Commit

Permalink
Drop PHP7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax committed Feb 9, 2020
1 parent 5a40993 commit 92b9a2a
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 58 deletions.
15 changes: 6 additions & 9 deletions .editorconfig
@@ -1,18 +1,15 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true

[*.php]
indent_size = 4

[composer.json]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml,json}]
indent_size = 2
16 changes: 8 additions & 8 deletions .travis.yml
@@ -1,20 +1,20 @@
sudo: false
language: php
dist: xenial

php:
- 7.1
- 7.2
- 7.3
- 7.4
- nightly
jobs:
include:
- php: 7.2
- php: 7.3
- php: 7.4
- php: nightly
env: COMPOSER_OPTION=--ignore-platform-reqs

cache:
directories:
- vendor

before_script:
- travis_retry composer install --no-interaction --no-suggest --ignore-platform-reqs
- travis_retry composer install --no-interaction --no-suggest $COMPOSER_OPTION
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -5,7 +5,7 @@
[![Test Coverage](https://api.codeclimate.com/v1/badges/4e9a1edcc42746a6786f/test_coverage)](https://codeclimate.com/github/kawax/niconico/test_coverage)

## Requirements
PHP >= 7.1.3
PHP >= 7.2

## 実装済みAPI
自分で使う用なので必要なAPIのみ実装。
Expand Down
60 changes: 30 additions & 30 deletions composer.json
@@ -1,33 +1,33 @@
{
"name": "revolution/niconico",
"description": "niconico api",
"keywords": [
"niconico"
],
"license": "MIT",
"authors": [
{
"name": "kawax",
"email": "kawaxbiz@gmail.com"
}
],
"require": {
"php": ">=7.1.3||^8.0",
"ext-simplexml": "*",
"ext-json": "*",
"guzzlehttp/guzzle": "^6.3||^7.0"
},
"require-dev": {
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"phpunit/phpunit": "^7.5"
},
"autoload": {
"psr-4": {
"Revolution\\Niconico\\": "src/"
}
},
"config": {
"preferred-install": "dist"
"name": "revolution/niconico",
"description": "niconico api",
"keywords": [
"niconico"
],
"license": "MIT",
"authors": [
{
"name": "kawax",
"email": "kawaxbiz@gmail.com"
}
],
"require": {
"php": "^7.2||^8.0",
"ext-simplexml": "*",
"ext-json": "*",
"guzzlehttp/guzzle": "^6.3||^7.0"
},
"require-dev": {
"fzaninotto/faker": "^1.9",
"mockery/mockery": "^1.3",
"phpunit/phpunit": "^8.0||^9.0"
},
"autoload": {
"psr-4": {
"Revolution\\Niconico\\": "src/"
}
},
"config": {
"preferred-install": "dist"
}
}
2 changes: 1 addition & 1 deletion tests/NicoSearchTest.php
Expand Up @@ -12,7 +12,7 @@ class NicoSearchTest extends TestCase
*/
protected $search;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand Down
16 changes: 7 additions & 9 deletions tests/NicoThumbTest.php
Expand Up @@ -13,7 +13,7 @@ class NicoThumbTest extends TestCase
*/
protected $thumb;

public function setUp()
public function setUp(): void
{
parent::setUp();

Expand All @@ -33,8 +33,8 @@ public function testNicoThumbJson()
{
$this->thumb->get('sm9');

$this->assertContains('"video_id":"sm9"', $this->thumb->toJson());
$this->assertContains('"video_id":"sm9"', (string) $this->thumb);
$this->assertStringContainsString('"video_id":"sm9"', $this->thumb->toJson());
$this->assertStringContainsString('"video_id":"sm9"', (string)$this->thumb);
}

public function testNicoThumbConstruct()
Expand Down Expand Up @@ -66,19 +66,17 @@ public function testNicoThumbSimpleObject()
$this->assertEquals('sm9', $this->thumb->toSimpleObject()->video_id);
}

/**
* @expectedException InvalidArgumentException
*/
public function testNicoThumbDelete()
{
$this->expectException(\InvalidArgumentException::class);

$this->thumb->get('sm8');
}

/**
* @expectedException InvalidArgumentException
*/
public function testNicoThumbInvalidArgumentException()
{
$this->expectException(\InvalidArgumentException::class);

$this->thumb->get('sm9');
$this->thumb->test;
}
Expand Down

0 comments on commit 92b9a2a

Please sign in to comment.