mirror of
https://github.com/SkillDisplay/PHPToolKit.git
synced 2024-12-26 12:16:10 +01:00
Merge branch 'master' of https://github.com/SkillDisplay/api-php into php8-migration
This commit is contained in:
commit
f28d2af8e0
11 changed files with 23 additions and 3099 deletions
10
.github/workflows/ci.yaml
vendored
10
.github/workflows/ci.yaml
vendored
|
@ -9,7 +9,7 @@ jobs:
|
|||
- name: Install PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.4
|
||||
php-version: 8.2
|
||||
|
||||
- name: Validate composer.json
|
||||
run: composer validate
|
||||
|
@ -19,9 +19,9 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
php-version:
|
||||
- 7.2
|
||||
- 7.3
|
||||
- 7.4
|
||||
- 8.1
|
||||
- 8.2
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
@ -42,7 +42,7 @@ jobs:
|
|||
- name: Install PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.4
|
||||
php-version: 8.2
|
||||
|
||||
- name: Get Composer Cache Directory
|
||||
id: composer-cache
|
||||
|
@ -70,7 +70,7 @@ jobs:
|
|||
- name: Install PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.4
|
||||
php-version: 8.2
|
||||
|
||||
- name: Get Composer Cache Directory
|
||||
id: composer-cache
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,4 @@
|
|||
/.idea/
|
||||
/vendor/
|
||||
.phpunit.result.cache
|
||||
composer.lock
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
],
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/guzzle": "^6.5",
|
||||
"guzzlehttp/guzzle": "^7.7",
|
||||
"php": "7.4.* || 8.1.* || 8.2.*"
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -29,5 +29,10 @@
|
|||
"phpunit/phpunit": "^9.3",
|
||||
"phpspec/prophecy-phpunit": "^2.0",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
}
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.x-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
2894
composer.lock
generated
2894
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -26,6 +26,7 @@ namespace SkillDisplay\PHPToolKit\Tests\Unit\Api;
|
|||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Psr7\Request;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use GuzzleHttp\Psr7\Utils;
|
||||
use Prophecy\Argument;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use SkillDisplay\PHPToolKit\Api\Campaigns;
|
||||
|
@ -75,7 +76,7 @@ class CampaignsTest extends TestCase
|
|||
}))->willReturn($response->reveal());
|
||||
|
||||
$response->getStatusCode()->willReturn(200);
|
||||
$response->getBody()->willReturn('{"Version": "1.0","ErrorMessage": "","Campaigns": [{"uid": 1},{"uid": 2}]}');
|
||||
$response->getBody()->willReturn(Utils::streamFor('{"Version": "1.0","ErrorMessage": "","Campaigns": [{"uid": 1},{"uid": 2}]}'));
|
||||
|
||||
$subject = new Campaigns(
|
||||
$settings->reveal(),
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace SkillDisplay\PHPToolKit\Tests\Unit\Api;
|
|||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Psr7\Request;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use GuzzleHttp\Psr7\Utils;
|
||||
use Prophecy\Argument;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use SkillDisplay\PHPToolKit\Api\SkillSet;
|
||||
|
@ -77,7 +78,7 @@ class SkillSetTest extends TestCase
|
|||
}))->willReturn($response->reveal());
|
||||
|
||||
$response->getStatusCode()->willReturn(200);
|
||||
$response->getBody()->willReturn('{"uid":10}');
|
||||
$response->getBody()->willReturn(Utils::streamFor('{"uid":10}'));
|
||||
|
||||
$subject = new SkillSet(
|
||||
$settings->reveal(),
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace SkillDisplay\PHPToolKit\Tests\Unit\Api;
|
|||
use GuzzleHttp\Client;
|
||||
use GuzzleHttp\Psr7\Request;
|
||||
use GuzzleHttp\Psr7\Response;
|
||||
use GuzzleHttp\Psr7\Utils;
|
||||
use Prophecy\Argument;
|
||||
use Prophecy\PhpUnit\ProphecyTrait;
|
||||
use SkillDisplay\PHPToolKit\Api\Skill;
|
||||
|
@ -77,7 +78,7 @@ class SkillTest extends TestCase
|
|||
}))->willReturn($response->reveal());
|
||||
|
||||
$response->getStatusCode()->willReturn(200);
|
||||
$response->getBody()->willReturn('{"uid":10}');
|
||||
$response->getBody()->willReturn(Utils::streamFor('{"uid":10}'));
|
||||
|
||||
$subject = new Skill(
|
||||
$settings->reveal(),
|
||||
|
|
|
@ -40,7 +40,7 @@ class BrandTest extends TestCase
|
|||
*/
|
||||
public function instanceCanNotBeCreatedViaConstructor()
|
||||
{
|
||||
$this->expectErrorMessage('Call to private SkillDisplay\PHPToolKit\Entity\Brand::__construct() from context \'SkillDisplay\PHPToolKit\Tests\Unit\Entity\BrandTest\'');
|
||||
$this->expectExceptionMessage('Call to private SkillDisplay\PHPToolKit\Entity\Brand::__construct() from scope SkillDisplay\PHPToolKit\Tests\Unit\Entity\BrandTest');
|
||||
new Brand();
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class SkillSetTest extends TestCase
|
|||
*/
|
||||
public function instanceCanNotBeCreatedViaConstructor()
|
||||
{
|
||||
$this->expectErrorMessage('Call to private SkillDisplay\PHPToolKit\Entity\SkillSet::__construct() from context \'SkillDisplay\PHPToolKit\Tests\Unit\Entity\SkillSetTest\'');
|
||||
$this->expectExceptionMessage('Call to private SkillDisplay\PHPToolKit\Entity\SkillSet::__construct() from scope SkillDisplay\PHPToolKit\Tests\Unit\Entity\SkillSetTest');
|
||||
new SkillSet();
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class SkillTest extends TestCase
|
|||
*/
|
||||
public function instanceCanNotBeCreatedViaConstructor()
|
||||
{
|
||||
$this->expectErrorMessage('Call to private SkillDisplay\PHPToolKit\Entity\Skill::__construct() from context \'SkillDisplay\PHPToolKit\Tests\Unit\Entity\SkillTest\'');
|
||||
$this->expectExceptionMessage('Call to private SkillDisplay\PHPToolKit\Entity\Skill::__construct() from scope SkillDisplay\PHPToolKit\Tests\Unit\Entity\SkillTest');
|
||||
new Skill();
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue