domain = $testSettings['mammut']['auth_ad']['domain']; $this->server = $testSettings['mammut']['auth_ad']['server']; $this->admUser = $testSettings['mammut']['auth_ad']['user']; $this->admPw = $testSettings['mammut']['auth_ad']['passwd']; } protected function tearDown() { if (!empty($this->adObj)) $this->adObj->disconnect(); } public function testOpenAuthCon() { $adObj = new \Mammut\Auth\AuthADS($this->domain, $this->server, false); $adObj->connect($this->admUser, $this->admPw); } protected function initCon() { $this->adObj = new \Mammut\Auth\AuthADS($this->domain, $this->server, false); $this->adObj->connect($this->admUser, $this->admPw); } /** * @depends testOpenAuthCon */ public function testAuth() { $this->initCon(); $this->assertTrue($this->adObj->authenticate($this->admUser, $this->admPw), 'SysUser should be able to AUTH'); } /** * @depends testOpenAuthCon */ public function testGetUserByName() { $this->initCon(); $usr = $this->adObj->getUserByName($this->admUser); $this->assertNotEmpty($usr, 'No user returnd for login user'); } /** * @depends testOpenAuthCon */ public function testGetUsers() { $this->initCon(); $elements = $this->adObj->listUsers(); $this->assertNotEmpty($elements, 'No groups returned'); } /** * @depends testOpenAuthCon */ public function testGetGroups() { $this->initCon(); $elements = $this->adObj->listGroups(); $this->assertNotEmpty($elements, 'No groups returned'); } }