diff --git a/phpunit.xml b/phpunit.xml index 58c39aa..211294e 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,21 +1,21 @@ - + stopOnFailure="false" + xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" + cacheDirectory=".phpunit.cache" + backupStaticProperties="false"> ./tests/ - - + + ./src/ - - + + diff --git a/tests/DynamoDb/DynamoDbManagerTest.php b/tests/DynamoDb/DynamoDbManagerTest.php index e4a48c1..0e22fc1 100644 --- a/tests/DynamoDb/DynamoDbManagerTest.php +++ b/tests/DynamoDb/DynamoDbManagerTest.php @@ -7,6 +7,7 @@ use BaoPham\DynamoDb\DynamoDbClientInterface; use BaoPham\DynamoDb\Tests\DynamoDbTestCase; use BaoPham\DynamoDb\DynamoDb\DynamoDbManager; +use BaoPham\DynamoDb\Tests\Mocks\DynamoDbClientMock; class DynamoDbManagerTest extends DynamoDbTestCase { @@ -25,9 +26,9 @@ public function setUp(): void parent::setUp(); $this->mockedClient = $this - ->getMockBuilder(DynamoDbClient::class) + ->getMockBuilder(DynamoDbClientMock::class) ->disableOriginalConstructor() - ->setMethods(['putItem', 'updateItem', 'deleteItem', 'scan', 'query', 'batchWriteItem']) + ->onlyMethods(['putItem', 'updateItem', 'deleteItem', 'scan', 'query', 'batchWriteItem']) ->getMock(); $service = $this->getMockBuilder(DynamoDbClientInterface::class)->getMock(); diff --git a/tests/Mocks/DynamoDbClientMock.php b/tests/Mocks/DynamoDbClientMock.php new file mode 100644 index 0000000..ee072cc --- /dev/null +++ b/tests/Mocks/DynamoDbClientMock.php @@ -0,0 +1,39 @@ +