Skip to content

Commit 7b7bb53

Browse files
authored
Merge pull request #8 from GenieTim/jkudish-master
Fix tests for upgraded dependencies
2 parents 6901b0c + 7c70a93 commit 7b7bb53

File tree

6 files changed

+23
-29
lines changed

6 files changed

+23
-29
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ sudo: false
33
language: php
44

55
php:
6-
- 7.1
76
- 7.2
7+
- 7.3
8+
- 7.4
89

910
matrix:
1011
fast_finish: true
@@ -14,5 +15,5 @@ before_script: composer install
1415
script: ./bin/phpunit --coverage-clover=coverage.clover
1516

1617
after_script:
17-
- if [ "$TRAVIS_PHP_VERSION" != "7.0" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
18-
- if [ "$TRAVIS_PHP_VERSION" != "7.0" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
18+
- wget https://scrutinizer-ci.com/ocular.phar;
19+
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover;

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@
2222
}
2323
],
2424
"require": {
25-
"php": "^7.1.3",
25+
"php": "^7.2",
2626
"ext-curl": "*",
2727
"jms/serializer": "^1.0|^2.0|^3.0",
28-
"symfony/event-dispatcher": "^2.3|^3.0|^4.0|^5.0",
28+
"guzzlehttp/guzzle": "^6.0|^7.0",
29+
"symfony/event-dispatcher": "^4.0|^5.0",
2930
"symfony/yaml": "^2.3|^3.0|^4.0|^5.0",
30-
"guzzlehttp/guzzle": "^6.0",
3131
"doctrine/collections": "^1.2"
3232
},
3333
"require-dev": {
34-
"phpunit/phpunit": "^7.0|^8.0",
34+
"phpunit/phpunit": "^7.0|^8.0|^9.0",
3535
"mockery/mockery": "^1.0",
36-
"symfony/var-dumper": "^2.3|^3.0|^4.0"
36+
"symfony/var-dumper": "^2.3|^3.0|^4.0|^5.0"
3737
},
3838
"suggest": {
3939
"hnhdigital-os//laravel-slack-api": "For easy integration with your Laravel projects"

phpunit.xml.dist

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
32
<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html -->
4-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.7/phpunit.xsd"
6-
backupGlobals="false"
7-
colors="true"
8-
bootstrap="vendor/autoload.php"
9-
>
3+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="vendor/autoload.php">
4+
<coverage>
5+
<include>
6+
<directory>./src/CL/Slack/</directory>
7+
</include>
8+
<exclude>
9+
<directory>./src/CL/Slack/Resources</directory>
10+
</exclude>
11+
</coverage>
1012
<testsuites>
1113
<testsuite name="Slack Test Suite">
1214
<directory>./tests</directory>
1315
</testsuite>
1416
</testsuites>
15-
1617
<!--<listeners>
1718
<listener class="Mockery\Adapter\Phpunit\TestListener"/>
1819
</listeners>-->
19-
20-
<filter>
21-
<whitelist>
22-
<directory>./src/CL/Slack/</directory>
23-
<exclude>
24-
<directory>./src/CL/Slack/Resources</directory>
25-
</exclude>
26-
</whitelist>
27-
</filter>
2820
</phpunit>

src/Transport/ApiClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ private function doSend($method, array $data, $token = null)
232232
try {
233233
$data['token'] = $token ?: $this->token;
234234

235-
$this->eventDispatcher->dispatch(self::EVENT_REQUEST, new RequestEvent($data));
235+
$this->eventDispatcher->dispatch(new RequestEvent($data), self::EVENT_REQUEST);
236236

237237
$request = $this->createRequest($method, $data);
238238

@@ -255,7 +255,7 @@ private function doSend($method, array $data, $token = null)
255255
));
256256
}
257257

258-
$this->eventDispatcher->dispatch(self::EVENT_RESPONSE, new ResponseEvent($responseData));
258+
$this->eventDispatcher->dispatch(new ResponseEvent($responseData), self::EVENT_RESPONSE);
259259

260260
return $responseData;
261261
} catch (\Exception $e) {

src/Transport/Events/RequestEvent.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
namespace CL\Slack\Transport\Events;
1313

14-
use Symfony\Component\EventDispatcher\Event;
14+
use Symfony\Contracts\EventDispatcher\Event;
15+
1516

1617
/**
1718
* @author Cas Leentfaar <[email protected]>

src/Transport/Events/ResponseEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace CL\Slack\Transport\Events;
1313

14-
use Symfony\Component\EventDispatcher\Event;
14+
use Symfony\Contracts\EventDispatcher\Event;
1515

1616
/**
1717
* @author Cas Leentfaar <[email protected]>

0 commit comments

Comments
 (0)