Skip to content

Commit aecdd53

Browse files
committed
add use session to test
1 parent e326137 commit aecdd53

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Test/Model/WikiPageTest.php

+9
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use Kanboard\Core\Plugin\Loader;
66
use Kanboard\Plugin\Wiki\Model\Wiki;
77
use Kanboard\Model\ProjectModel;
8+
use Kanboard\Core\User\UserSession;
9+
use Kanboard\Core\Security\AuthenticationManager;
10+
use Kanboard\Auth\DatabaseAuth;
811

912
class WikiPageTest extends Base
1013
{
@@ -46,6 +49,12 @@ public function testCreation()
4649
];
4750

4851
// create wiki page edition
52+
// $this->userSession = new UserSession($this->container);
53+
54+
$authManager = new AuthenticationManager($this->container);
55+
$authManager->register(new DatabaseAuth($this->container));
56+
57+
$_SESSION['user'] = array('id' => 1, 'username' => 'test', 'role' => 'app-admin');
4958
$this->assertEquals(1, $wikimodel->createEdition($values, 1, 1), 'Failed to create wiki edition');
5059

5160
$editions = $wikimodel->getEditions(1);

0 commit comments

Comments
 (0)