Skip to content

Commit 2f4b4f2

Browse files
suh1986munir131
andauthored
updated laravel version to 7
Co-authored-by: Munir Khakhi <[email protected]>
1 parent 4b3a7c8 commit 2f4b4f2

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

.styleci.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
}
1919
],
2020
"require": {
21-
"php": ">=7.1",
21+
"php": ">=7.2.5",
2222
"google/cloud-pubsub": "^1.1",
23-
"illuminate/queue": "6.*",
24-
"laravel/helpers": "^1.1"
23+
"illuminate/queue": "7.*",
24+
"laravel/helpers": "^1.3"
2525
},
2626
"require-dev": {
27-
"phpunit/phpunit": "^7.1"
27+
"phpunit/phpunit": "^8.5"
2828
},
2929
"autoload": {
3030
"psr-4": {

tests/Unit/Jobs/PubSubJobTests.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
namespace PubSub\PubSubQueue\Tests\Unit\Jobs;
44

5-
use ReflectionClass;
6-
use PHPUnit\Framework\TestCase;
75
use Google\Cloud\PubSub\Message;
8-
use Illuminate\Container\Container;
96
use Google\Cloud\PubSub\PubSubClient;
10-
use PubSub\PubSubQueue\PubSubQueue;
11-
use PubSub\PubSubQueue\Jobs\PubSubJob;
7+
use Illuminate\Container\Container;
128
use Illuminate\Contracts\Queue\Job as JobContract;
9+
use PHPUnit\Framework\TestCase;
10+
use PubSub\PubSubQueue\Jobs\PubSubJob;
11+
use PubSub\PubSubQueue\PubSubQueue;
12+
use ReflectionClass;
1313

1414
class PubSubJobTests extends TestCase
1515
{
16-
public function teardown()
16+
public function teardown(): void
1717
{
1818
//
1919
}
2020

21-
public function setUp()
21+
public function setUp(): void
2222
{
2323
$this->messageId = '1234';
2424
$this->messageData = json_encode(['id' => $this->messageId, 'foo' => 'bar']);

tests/Unit/PubSubQueueTests.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
class PubSubQueueTests extends TestCase
1818
{
19-
public function teardown()
19+
public function teardown(): void
2020
{
2121
//
2222
}
2323

24-
public function setUp()
24+
public function setUp(): void
2525
{
2626
$this->result = 'message-id';
2727

@@ -72,7 +72,6 @@ public function testPushNewJob()
7272
$decoded_payload = json_decode($payload, true);
7373
return $decoded_payload['data'] === $data && $decoded_payload['job'] === $job;
7474
}));
75-
7675
$this->assertEquals($this->result, $this->queue->push('test', $data));
7776
}
7877

@@ -114,7 +113,7 @@ public function testLater()
114113
$this->isType('string'),
115114
$this->anything(),
116115
$this->callback(function ($options) use ($delay_timestamp_string) {
117-
if (!isset($options['available_at']) || $options['available_at'] !== $delay_timestamp_string) {
116+
if (! isset($options['available_at']) || $options['available_at'] !== $delay_timestamp_string) {
118117
return false;
119118
}
120119

@@ -225,15 +224,15 @@ public function testAcknowledgeAndPublish()
225224
->willReturn($this->result)
226225
->with(
227226
$this->callback(function ($message) use ($options, $delay_timestamp_string) {
228-
if (!isset($message['attributes'])) {
227+
if (! isset($message['attributes'])) {
229228
return false;
230229
}
231230

232-
if (!isset($message['attributes']['available_at']) || $message['attributes']['available_at'] !== $delay_timestamp_string) {
231+
if (! isset($message['attributes']['available_at']) || $message['attributes']['available_at'] !== $delay_timestamp_string) {
233232
return false;
234233
}
235234

236-
if (!isset($message['attributes']['foo']) || $message['attributes']['foo'] != $options['foo']) {
235+
if (! isset($message['attributes']['foo']) || $message['attributes']['foo'] != $options['foo']) {
237236
return false;
238237
}
239238

@@ -286,6 +285,7 @@ public function testGetQueue()
286285
$this->assertTrue($queue->getQueue('sub1') === 'topic1');
287286

288287
}
288+
289289
public function testSubscribtionIsCreated()
290290
{
291291
$this->topic->method('subscription')

0 commit comments

Comments
 (0)