Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
plessbd committed May 13, 2019
1 parent 38f39dc commit 5ebef00
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 70 deletions.
62 changes: 0 additions & 62 deletions tests/artifacts/xdmod/user_admin/input/get_dw_descripters-1.json

This file was deleted.

26 changes: 18 additions & 8 deletions tests/integration/lib/Controllers/UserAdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,14 +399,11 @@ public function provideGetTabs()
* @depends testCreateUsersSuccess
* @dataProvider provideGetDwDescripters
* @group UserAdminTest.createUsers
* @param array $user
* @param string $username
* @throws \Exception
*/
public function testGetDwDescripters(array $user)
public function testGetDwDescripters($username)
{
$this->assertArrayHasKey('username', $user);
$username = $user['username'];

$isPublicUser = $username === self::PUBLIC_USER_NAME;

if (!$isPublicUser) {
Expand Down Expand Up @@ -459,13 +456,26 @@ public function testGetDwDescripters(array $user)
}

/**
* @return array|object
* The @returns for this is misleading.
* technically it returns an array of arrays of a single string
* however the funtion that gets called from this only ever gets the string
* @return string
* @throws \Exception
*/
public function provideGetDwDescripters()
{
return JSON::loadFile(
$this->getTestFiles()->getFile('user_admin', 'get_dw_descripters-1', 'input')
return array(
array("admin"),
array("centerdirector"),
array("centerstaff"),
array("principal"),
array("normaluser"),
array("test.cd.one-center"),
array("test.pi"),
array("test.normal-user"),
array("test.usr_dev"),
array("test.usr_mgr"),
array("test.usr_mgr_dev")
);
}

Expand Down

0 comments on commit 5ebef00

Please sign in to comment.