@@ -27,13 +27,14 @@ public function testCreation()
27
27
28
28
$ projectModel = new ProjectModel ($ this ->container );
29
29
30
- $ this ->assertEquals (1 , $ projectModel ->create (array ('name ' => 'UnitTest ' )));
30
+ $ this ->assertEquals (1 , $ projectModel ->create (array ('name ' => 'UnitTest ' )), ' Failed to create project ' );
31
31
32
32
$ project = $ projectModel ->getById (1 );
33
33
34
34
$ wikimodel = new Wiki ($ this ->container );
35
- $ this ->assertEquals (1 , $ wikimodel ->createpage ($ project ['id ' ], "Security " , "Some content " , '2015-01-01 ' ));
36
- $ this ->assertEquals (2 , $ wikimodel ->createpage ($ project ['id ' ], "Conventions " , 'More content ' ));
35
+ // create wiki pages
36
+ $ this ->assertEquals (1 , $ wikimodel ->createpage ($ project ['id ' ], "Security " , "Some content " , '2015-01-01 ' , 'Failed to a create wiki page on project ' ));
37
+ $ this ->assertEquals (2 , $ wikimodel ->createpage ($ project ['id ' ], "Conventions " , 'More content ' , 'Failed to an additional create wiki page on project ' ));
37
38
38
39
// grab editions for first wiki page
39
40
$ editions = $ wikimodel ->getEditions (1 );
@@ -44,39 +45,13 @@ public function testCreation()
44
45
'content ' => "Some content " ,
45
46
];
46
47
47
- $ this ->assertEquals (1 , $ wikimodel ->createEdition ($ values , 1 , 1 ));
48
-
49
- // createpage
50
-
51
- // $rates = $hr->getAllByUser(0);
52
- // $this->assertEmpty($rates);
48
+ // create wiki page edition
49
+ $ this ->assertEquals (1 , $ wikimodel ->createEdition ($ values , 1 , 1 ), 'Failed to create wiki edition ' );
53
50
54
51
$ editions = $ wikimodel ->getEditions (1 );
55
- $ this ->assertNotEmpty ($ editions );
56
- // $rates = $hr->getAllByUser(1);
57
- // $this->assertNotEmpty($rates);
58
- // $this->assertCount(1, $editions);
52
+ $ this ->assertNotEmpty ($ editions , 'Failed to get wiki editions ' );
59
53
60
- // $this->assertEquals(42, $rates[0]['rate']);
61
54
$ this ->assertEquals ('Security ' , $ editions [0 ]['title ' ]);
62
55
$ this ->assertEquals ('Some content ' , $ editions [0 ]['content ' ]);
63
-
64
- // $this->assertEquals('2015-02-01', date('Y-m-d', $rates[0]['date_effective']));
65
-
66
- // $this->assertEquals(32.4, $rates[1]['rate']);
67
- // $this->assertEquals('EUR', $rates[1]['currency']);
68
- // $this->assertEquals('2015-01-01', date('Y-m-d', $rates[1]['date_effective']));
69
-
70
- // $this->assertEquals(0, $hr->getCurrentRate(0));
71
- // $this->assertEquals(42, $hr->getCurrentRate(1));
72
-
73
- // $this->assertTrue($wikimodel->removepage(1));
74
- // $this->assertEquals(32.4, $hr->getCurrentRate(1));
75
-
76
- // $this->assertTrue($hr->remove(1));
77
- // $this->assertEquals(0, $hr->getCurrentRate(1));
78
-
79
- // $rates = $hr->getAllByUser(1);
80
- // $this->assertEmpty($rates);
81
56
}
82
57
}
0 commit comments