Skip to content

Commit

Permalink
Merge pull request #31 from kitar/php82
Browse files Browse the repository at this point in the history
Support PHP 8.2
  • Loading branch information
kitar committed Dec 12, 2022
2 parents 4cc15a5 + e814bda commit edb21cb
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
php-version: ['7.3', '7.4', '8.0', '8.1']
php-version: ['7.3', '7.4', '8.0', '8.1', '8.2']

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -20,7 +20,7 @@
"ci-test": "vendor/bin/phpunit --coverage-clover coverage.xml"
},
"require": {
"php": "^7.3|^8.0|^8.1",
"php": "^7.3|^7.4|^8.0|^8.1|^8.2",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
"illuminate/container": "^6.0|^7.0|^8.0|^9.0",
"illuminate/database": "^6.0|^7.0|^8.0|^9.0",
Expand Down
4 changes: 2 additions & 2 deletions tests/ConnectionTest.php
Expand Up @@ -73,7 +73,7 @@ public function it_can_call_client_query()
$client = m::mock(DynamoDbClient::class);
$client->shouldReceive('query')->with([
'TableName' => 'User'
]);
])->once();

$connection = new Connection([]);
$connection->setClient($client);
Expand All @@ -88,7 +88,7 @@ public function it_can_forward_call_to_dynamodb_client()
$client = m::mock(DynamoDbClient::class);
$client->shouldReceive('getItem')->with([
'TableName' => 'User'
]);
])->once();

$connection = new Connection([]);
$connection->setClient($client);
Expand Down
12 changes: 6 additions & 6 deletions tests/Model/ModelTest.php
Expand Up @@ -400,7 +400,7 @@ public function it_can_process_all()
]);

$connection = $this->newConnectionMock();
$connection->shouldReceive('scan')->with($params)->andReturn($return);
$connection->shouldReceive('scan')->with($params)->andReturn($return)->once();
$this->setConnectionResolver($connection);

UserA::all();
Expand All @@ -423,7 +423,7 @@ public function it_can_save_new_instance()
];

$connection = $this->newConnectionMock();
$connection->shouldReceive('putItem')->with($params);
$connection->shouldReceive('putItem')->with($params)->once();
$this->setConnectionResolver($connection);

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

$connection = $this->newConnectionMock();
$connection->shouldReceive('putItem')->with($params);
$connection->shouldReceive('putItem')->with($params)->once();
$this->setConnectionResolver($connection);

UserD::create(['partition' => 'p']);
Expand Down Expand Up @@ -490,7 +490,7 @@ public function it_can_save_existing_instance()
];

$connection = $this->newConnectionMock();
$connection->shouldReceive('updateItem')->with($params)->andReturn($this->sampleAwsResultEmpty());
$connection->shouldReceive('updateItem')->with($params)->andReturn($this->sampleAwsResultEmpty())->once();
$this->setConnectionResolver($connection);

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

$connection = $this->newConnectionMock();
$connection->shouldReceive('deleteItem')->with($params);
$connection->shouldReceive('deleteItem')->with($params)->once();
$this->setConnectionResolver($connection);

$user = (new UserA)->newFromBuilder(['partition' => 'p']);
Expand Down Expand Up @@ -575,7 +575,7 @@ public function it_can_call_allowed_builder_method()
'S' => 'p'
]
]
]);
])->once();
$this->setConnectionResolver($connection);

UserA::putItem([
Expand Down
5 changes: 3 additions & 2 deletions tests/Query/BuilderTest.php
Expand Up @@ -952,7 +952,8 @@ public function it_can_process_process()
$connection = m::mock(Connection::class);
$connection->shouldReceive('scan')
->with(['TableName' => 'Forum'])
->andReturn(new Result(['Items' => []]));
->andReturn(new Result(['Items' => []]))
->once();

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

Expand All @@ -974,7 +975,7 @@ public function it_can_process_process_with_no_processor()
'S' => 'Laravel Thread 1'
]
]
])->andReturn(new Result(['Items' => []]));
])->andReturn(new Result(['Items' => []]))->once();

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

Expand Down

0 comments on commit edb21cb

Please sign in to comment.