Skip to content

Commit

Permalink
PSR-2 for authpdo plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
splitbrain committed May 8, 2018
1 parent 957f36a commit 3213bf4
Show file tree
Hide file tree
Showing 3 changed files with 230 additions and 210 deletions.
8 changes: 4 additions & 4 deletions lib/plugins/authpdo/_test/sqlite.test.php
Expand Up @@ -10,8 +10,8 @@ public function getPluginName() {
return 'authpdo';
}

public function _selectGroups() {
return parent::_selectGroups();
public function selectGroups() {
return parent::selectGroups();
}

public function addGroup($group) {
Expand Down Expand Up @@ -96,15 +96,15 @@ public function tearDown() {
public function test_internals() {
$auth = new testable_auth_plugin_authpdo();

$groups = $auth->_selectGroups();
$groups = $auth->selectGroups();
$this->assertArrayHasKey('user', $groups);
$this->assertEquals(1, $groups['user']['gid']);
$this->assertArrayHasKey('admin', $groups);
$this->assertEquals(2, $groups['admin']['gid']);

$ok = $auth->addGroup('test');
$this->assertTrue($ok);
$groups = $auth->_selectGroups();
$groups = $auth->selectGroups();
$this->assertArrayHasKey('test', $groups);
$this->assertEquals(3, $groups['test']['gid']);
}
Expand Down

0 comments on commit 3213bf4

Please sign in to comment.