ItemHistoryTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 25
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 7 1
A historyBasics() 0 6 1
1
<?php
2
3
namespace App\Tests;
4
5
use App\Item;
6
use App\User;
7
8
class ItemHistoryTest extends Base
9
{
10
11
    /** @var User */
12
    protected $testUser;
13
14
    public function setUp()
15
    {
16
        parent::setUp();
17
        $this->setUpDb();
18
        $this->testUser = new User($this->db);
19
        $this->testUser->register('Test User');
20
    }
21
22
    /**
23
     * @testdox An Item has an ID and title and has by default plain text contents.
24
     * @test
25
     */
26
    public function historyBasics()
27
    {
28
        $item = new Item(null, $this->testUser);
29
        $item->save(['title' => 'Test']);
30
        $this->assertCount(0, $item->getChangeSets());
31
    }
32
}
33