Skip to content

Commit 6607468

Browse files
committed
create project
1 parent e5bb7db commit 6607468

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Test/Model/WikiPageTest.php

+10-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,18 @@ protected function setUp(): void
2323

2424
public function testCreation()
2525
{
26+
27+
$projectModel = new ProjectModel($this->container);
28+
29+
$this->assertEquals(1, $projectModel->create(array('name' => 'UnitTest')));
30+
31+
$project = $projectModel->getById(1);
32+
2633
$wikimodel = new Wiki($this->container);
27-
$this->assertEquals(1, $wikimodel->createpage(1, "Security", "Some content", '2015-01-01'));
28-
$this->assertEquals(2, $wikimodel->createpage(1, "Conventions", 'More content'));
34+
$this->assertEquals(1, $wikimodel->createpage($project['id'], "Security", "Some content", '2015-01-01'));
35+
$this->assertEquals(2, $wikimodel->createpage($project['id'], "Conventions", 'More content'));
2936

30-
37+
// grab editions for first wiki page
3138
$editions = $wikimodel->getEditions(1);
3239
$this->assertEmpty($editions);
3340

0 commit comments

Comments
 (0)