Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Completing unit test for access

  • Loading branch information...
commit 254620a5dc75b58b5783416fc0fb2e591b0e767e 1 parent cdba6ce
Christophe Demko authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 tests/suite/joomla/access/JAccessTest.php
12 tests/suite/joomla/access/JAccessTest.php
View
@@ -439,7 +439,6 @@ public function testGetGroupsByUser()
$this->markTestSkipped('The database is not available');
}
- $access = new JAccess();
$array1 = array(
0 => 1,
1 => 6,
@@ -448,7 +447,7 @@ public function testGetGroupsByUser()
);
$this->assertThat(
$array1,
- $this->equalTo($access->getGroupsByUser(42, True))
+ $this->equalTo(JAccess::getGroupsByUser(42, True))
);
$array2 = array(
@@ -456,13 +455,18 @@ public function testGetGroupsByUser()
);
$this->assertThat(
$array2,
- $this->equalTo($access->getGroupsByUser(42, False))
+ $this->equalTo(JAccess::getGroupsByUser(42, False))
);
jimport('joomla.application.component.helper');
$this->assertThat(
- $access->getGroupsByUser(null),
+ JAccess::getGroupsByUser(null),
+ $this->equalTo(array(1))
+ );
+
+ $this->assertThat(
+ JAccess::getGroupsByUser(null, false),
$this->equalTo(array(1))
);
}
Please sign in to comment.
Something went wrong with that request. Please try again.