Skip to content

Commit edb21cb

Browse files
authored
Merge pull request #31 from kitar/php82
Support PHP 8.2
2 parents 4cc15a5 + e814bda commit edb21cb

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

.github/workflows/php.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
php-version: ['7.3', '7.4', '8.0', '8.1']
12+
php-version: ['7.3', '7.4', '8.0', '8.1', '8.2']
1313

1414
steps:
1515
- name: Checkout

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"ci-test": "vendor/bin/phpunit --coverage-clover coverage.xml"
2121
},
2222
"require": {
23-
"php": "^7.3|^8.0|^8.1",
23+
"php": "^7.3|^7.4|^8.0|^8.1|^8.2",
2424
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
2525
"illuminate/container": "^6.0|^7.0|^8.0|^9.0",
2626
"illuminate/database": "^6.0|^7.0|^8.0|^9.0",

tests/ConnectionTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function it_can_call_client_query()
7373
$client = m::mock(DynamoDbClient::class);
7474
$client->shouldReceive('query')->with([
7575
'TableName' => 'User'
76-
]);
76+
])->once();
7777

7878
$connection = new Connection([]);
7979
$connection->setClient($client);
@@ -88,7 +88,7 @@ public function it_can_forward_call_to_dynamodb_client()
8888
$client = m::mock(DynamoDbClient::class);
8989
$client->shouldReceive('getItem')->with([
9090
'TableName' => 'User'
91-
]);
91+
])->once();
9292

9393
$connection = new Connection([]);
9494
$connection->setClient($client);

tests/Model/ModelTest.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ public function it_can_process_all()
400400
]);
401401

402402
$connection = $this->newConnectionMock();
403-
$connection->shouldReceive('scan')->with($params)->andReturn($return);
403+
$connection->shouldReceive('scan')->with($params)->andReturn($return)->once();
404404
$this->setConnectionResolver($connection);
405405

406406
UserA::all();
@@ -423,7 +423,7 @@ public function it_can_save_new_instance()
423423
];
424424

425425
$connection = $this->newConnectionMock();
426-
$connection->shouldReceive('putItem')->with($params);
426+
$connection->shouldReceive('putItem')->with($params)->once();
427427
$this->setConnectionResolver($connection);
428428

429429
$user = new UserA(['partition' => 'p']);
@@ -448,7 +448,7 @@ public function it_can_static_create_new_instance()
448448
];
449449

450450
$connection = $this->newConnectionMock();
451-
$connection->shouldReceive('putItem')->with($params);
451+
$connection->shouldReceive('putItem')->with($params)->once();
452452
$this->setConnectionResolver($connection);
453453

454454
UserD::create(['partition' => 'p']);
@@ -490,7 +490,7 @@ public function it_can_save_existing_instance()
490490
];
491491

492492
$connection = $this->newConnectionMock();
493-
$connection->shouldReceive('updateItem')->with($params)->andReturn($this->sampleAwsResultEmpty());
493+
$connection->shouldReceive('updateItem')->with($params)->andReturn($this->sampleAwsResultEmpty())->once();
494494
$this->setConnectionResolver($connection);
495495

496496
$user = (new UserA)->newFromBuilder(['partition' => 'p']);
@@ -526,7 +526,7 @@ public function it_can_delete_existing_instance()
526526
];
527527

528528
$connection = $this->newConnectionMock();
529-
$connection->shouldReceive('deleteItem')->with($params);
529+
$connection->shouldReceive('deleteItem')->with($params)->once();
530530
$this->setConnectionResolver($connection);
531531

532532
$user = (new UserA)->newFromBuilder(['partition' => 'p']);
@@ -575,7 +575,7 @@ public function it_can_call_allowed_builder_method()
575575
'S' => 'p'
576576
]
577577
]
578-
]);
578+
])->once();
579579
$this->setConnectionResolver($connection);
580580

581581
UserA::putItem([

tests/Query/BuilderTest.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -952,7 +952,8 @@ public function it_can_process_process()
952952
$connection = m::mock(Connection::class);
953953
$connection->shouldReceive('scan')
954954
->with(['TableName' => 'Forum'])
955-
->andReturn(new Result(['Items' => []]));
955+
->andReturn(new Result(['Items' => []]))
956+
->once();
956957

957958
$query = new Builder($connection, new Grammar, new Processor);
958959

@@ -974,7 +975,7 @@ public function it_can_process_process_with_no_processor()
974975
'S' => 'Laravel Thread 1'
975976
]
976977
]
977-
])->andReturn(new Result(['Items' => []]));
978+
])->andReturn(new Result(['Items' => []]))->once();
978979

979980
$query = new Builder($connection, new Grammar, new Processor);
980981

0 commit comments

Comments
 (0)