public function testRemoveAKey() { // Arrange. $key = 'bar'; $this->mockDynamoDbClient->expects($this->once())->method('deleteItem')->with(['TableName' => $this->storeKeyTableName, 'Key' => [$this->storeKeyAttribute => ['S' => $key]]]); // Act. $this->storeKeyClient->delete($key); // Assert in arrange. }
/** * @return \Aws\Common\Command\JsonCommand */ public function getMockedCommand(DynamoDbClient $client) { $command = $this->getMock('Aws\\Common\\Command\\JsonCommand'); $client->expects($this->any())->method('getCommand')->will($this->returnValue($command)); return $command; }