Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | public function testBasic() |
||
11 | { |
||
12 | $project = new Project('TestProject'); |
||
13 | $page = new Page( $project, 'Test_page'); |
||
14 | $edit = new Edit($page, [ |
||
15 | 'id' => '1', |
||
16 | 'timestamp' => '20170101100000', |
||
17 | 'minor' => '0', |
||
18 | 'length' => '12', |
||
19 | 'length_change' => '2', |
||
20 | 'username' => 'Testuser', |
||
21 | 'comment' => 'Test', |
||
22 | ]); |
||
23 | $this->assertEquals($project, $edit->getProject()); |
||
24 | $this->assertInstanceOf(DateTime::class, $edit->getTimestamp()); |
||
25 | $this->assertEquals($page, $edit->getPage()); |
||
26 | $this->assertEquals('1483264800', $edit->getTimestamp()->getTimestamp()); |
||
27 | $this->assertEquals(1, $edit->getId()); |
||
28 | $this->assertFalse($edit->isMinor()); |
||
29 | } |
||
30 | |||
32 |