-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(test): replace setMethods (deprecated) with onlyMethods and add a…
… new DynamoDbClientMock class to declare the needed methods (otherwise onlyMethods would not work)
- Loading branch information
Claudio La Barbera
committed
Apr 2, 2024
1 parent
43bcfc6
commit f55d66c
Showing
2 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace BaoPham\DynamoDb\Tests\Mocks; | ||
|
||
use Aws\DynamoDb\DynamoDbClient; | ||
use Aws\Result; | ||
|
||
class DynamoDbClientMock extends DynamoDbClient | ||
{ | ||
public function putItem(array $args = []): Result { | ||
return parent::putItem($args); | ||
} | ||
|
||
public function updateItem(array $args = []): Result { | ||
return parent::updateItem($args); | ||
} | ||
|
||
public function deleteItem(array $args = []): Result { | ||
return parent::deleteItem($args); | ||
} | ||
|
||
public function scan(array $args = []): Result { | ||
return parent::scan($args); | ||
} | ||
|
||
public function query(array $args = []): Result { | ||
return parent::query($args); | ||
} | ||
|
||
public function batchWriteItem(array $args = []): Result { | ||
return parent::batchWriteItem($args); | ||
} | ||
} |