TestCase::setUp()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 2
nc 2
nop 0
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