Passed
Push — master ( f437aa...c74702 )
by Sam
04:15
created

ItemHistoryTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

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