Skip to content

Commit

Permalink
Update Composer and PHPUnit to PHP 8.0 (#56)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Chibrikin <alek13.me@gmail.com>
  • Loading branch information
phpfui and alek13 authored Dec 7, 2020
1 parent a45f683 commit b26b2a7
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ composer.phar
composer.lock
.DS_Store
/phpunit.xml
.phpunit.result.cache
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ php:
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0

before_script:
- travis_retry composer self-update
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
}
],
"require": {
"php": "^7.1",
"php": "^7.1|^8.0",
"guzzlehttp/guzzle": "~7.0|~6.0|~5.0|~4.0",
"ext-mbstring": "*",
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^7.5",
"phpunit/phpunit": ">=7.5",
"mockery/mockery": "^1.0"
},
"autoload": {
Expand Down
4 changes: 3 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
Expand Down
2 changes: 1 addition & 1 deletion tests/Block/ActionsUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function testSectionFromArray()
public function testInvalidElement()
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessageRegExp('/Block element .+ is not valid/');
$this->expectExceptionMessage('Block element Maknz\Slack\BlockElement\MultiSelect is not valid');
$a = new Actions([
'elements' => [[
'type' => 'multi_static_select',
Expand Down
2 changes: 1 addition & 1 deletion tests/Block/ContextUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testContextFromArray()
public function testInvalidElement()
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessageRegExp('/Block element .+ is not valid/');
$this->expectExceptionMessage('Block element Maknz\Slack\BlockElement\MultiSelect is not valid');
$c = new Context([
'elements' => [[
'type' => 'multi_static_select',
Expand Down
2 changes: 1 addition & 1 deletion tests/Block/InputUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testInputFromArray()
public function testInvalidElement()
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessageRegExp('/Block element .+ is not valid/');
$this->expectExceptionMessage('Block element Maknz\Slack\BlockElement\Button is not valid');
$i = new Input([
'element' => [
'type' => 'button',
Expand Down
2 changes: 1 addition & 1 deletion tests/BlockElementUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testFactoryMissingType()
public function testFactoryInvalidType()
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessageRegExp('/Invalid Block type "invalid"/');
$this->expectExceptionMessage('Invalid Block type "invalid"');
$element = BlockElement::factory([
'type' => 'invalid',
]);
Expand Down
2 changes: 1 addition & 1 deletion tests/BlockUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testFactoryMissingType()
public function testFactoryInvalidType()
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessageRegExp('/Block type must be one of/');
$this->expectExceptionMessage('Block type must be one of');
$element = Block::factory([
'type' => 'invalid',
]);
Expand Down

0 comments on commit b26b2a7

Please sign in to comment.