TestCase   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 9
c 1
b 0
f 0
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 5 2
A setUp() 0 6 2
1
<?php
2
3
namespace GuillermoandraeTest\DynamoDb;
4
5
use Guillermoandrae\DynamoDb\DynamoDbAdapter;
6
7
class TestCase extends \PHPUnit\Framework\TestCase
8
{
9
    /**
10
     * @var DynamoDbAdapter The DynamoDb adapter.
11
     */
12
    protected $adapter;
13
14
    protected function setUp(): void
15
    {
16
        $this->adapter = new DynamoDbAdapter();
17
        $tables = $this->adapter->listTables();
18
        foreach ($tables as $table) {
19
            $this->adapter->useTable($table)->deleteTable();
20
        }
21
    }
22
23
    protected function tearDown(): void
24
    {
25
        $tables = $this->adapter->listTables();
26
        foreach ($tables as $table) {
27
            $this->adapter->useTable($table)->deleteTable();
28
        }
29
    }
30
}
31