Beispiel #1
0
 public function testAddNewOne()
 {
     $manager = new \JasminWeb\Jasmin\User(self::$telnetConnector);
     $groupManager = new \JasminWeb\Jasmin\Group(self::$telnetConnector);
     $groupManager->setId('test_new_one');
     $this->assertFalse($manager->checkExist('test_new_one'));
     $manager->setId('test_new_one');
     $manager->attributes['username'] = '******';
     $manager->attributes['password'] = '******';
     $manager->attributes['gid'] = 'test_new_one';
     $this->assertTrue($manager->add());
     $this->assertTrue($manager->checkExist('test_new_one'));
     $this->assertTrue($groupManager->checkExist('test_new_one'));
     $this->assertTrue($manager->delete());
     $this->assertFalse($manager->checkExist('test_new_one'));
     $this->assertTrue($groupManager->delete());
 }
Beispiel #2
0
 public function testCheckExistence()
 {
     $manager = new \JasminWeb\Jasmin\Group(self::$telnetConnector);
     $this->assertTrue($manager->checkExist('test_exist'));
     $this->assertFalse($manager->checkExist('test_not_exist'));
 }