Completed
Push — master ( a7a349...3fc402 )
by Guillermo A.
03:23
created

ListTablesOperationTest::testSetLimit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace GuillermoandraeTest\DynamoDb\Operation;
4
5
use Guillermoandrae\DynamoDb\Factory\DynamoDbClientFactory;
6
use Guillermoandrae\DynamoDb\Factory\MarshalerFactory;
7
use Guillermoandrae\DynamoDb\Operation\ListTablesOperation;
8
use PHPUnit\Framework\TestCase;
9
10
final class ListTablesOperationTest extends TestCase
11
{
12
    public function testSetLastEvaluatedTableName()
13
    {
14
        $request = new ListTablesOperation(DynamoDbClientFactory::factory(), MarshalerFactory::factory());
15
        $request->setLastEvaluatedTableName('test');
16
        $expectedQuery = [
17
            'LastEvaluatedTableName' => 'test',
18
        ];
19
        $this->assertEquals($expectedQuery, $request->toArray());
20
    }
21
22
    public function testSetLimit()
23
    {
24
        $request = new ListTablesOperation(DynamoDbClientFactory::factory(), MarshalerFactory::factory());
25
        $request->setLimit(5);
26
        $expectedQuery = [
27
            'Limit' => 5,
28
        ];
29
        $this->assertEquals($expectedQuery, $request->toArray());
30
    }
31
}
32