Lines Matching +full:x +full:- +full:age

20      * All tests assume to be running against https://github.com/splitbrain/vagrant-active-directory
62 'mobile' => '+63 (483) 526-8809',
65 $client = $this->getClient();
66 $user = $client->getUser('a.legrand@example.local');
68 …$this->assertGreaterThan(mktime(0,0,0,6,1,2023), $user['lastpwd'], 'lastpwd should be a timestamp'…
70 $this->assertSame($expect, $user);
73 $user = $client->getUser('a.legrand');
75 $this->assertSame($expect, $user);
78 $user = $client->getUser('A.LeGrand');
80 $this->assertSame($expect, $user);
85 $client = $this->getClient();
86 $user = $client->getUser('averylongusernamethatisverylong');
87 $this->assertIsArray($user);
88 $this->assertEquals('averylongusernamethatisverylong', $user['user']);
109 $client = $this->getClient(['recursivegroups' => 1]);
110 $user = $client->getUser('m.albro@example.local');
111 $this->assertSame($expect, $user['grps']);
120 $client = $this->getClient(['page_size' => 2]);
122 $groups = $client->getGroups();
123 $this->assertGreaterThan(3, count($groups));
124 $this->assertContains('alpha', $groups);
125 $this->assertContains('beta', $groups);
126 $this->assertContains('gamma nested', $groups);
127 $this->assertContains('domain users', $groups);
136 $client = $this->getClient(['page_size' => 2]);
138 $groups = $client->getGroups('alpha', ADClient::FILTER_EQUAL);
139 $this->assertCount(1, $groups);
140 $this->assertSame(['alpha'], array_values($groups));
146 $client = $this->getClient(['page_size' => 2]);
148 $users = $client->getFilteredUsers(['grps' => 'alpha'], ADClient::FILTER_EQUAL);
149 $this->assertGreaterThan(20, count($users));
150 $this->assertLessThan(150, count($users));
152 $this->assertArrayHasKey('a.blaskett', $users, 'This user should be in alpha');
153 $this->assertArrayNotHasKey('a.legrand', $users, 'This user is not in alpha');
155 …$users = $client->getFilteredUsers(['grps' => 'alpha', 'name' => 'Andras'], ADClient::FILTER_START…
156 $this->assertCount(1, $users);
159 $users = $client->getFilteredUsers(['grps' => 'gamma nested'], ADClient::FILTER_EQUAL);
160 $this->assertArrayHasKey('m.mcnevin', $users, 'This user should be in Gamma Nested');
168 $client = $this->getClient(['recursivegroups' => 1]);
170 $users = $client->getFilteredUsers(['grps' => 'beta'], ADClient::FILTER_EQUAL);
171 $this->assertArrayHasKey('m.albro', $users, 'user should be in beta');
173 $users = $client->getFilteredUsers(['grps' => 'gamma nested'], ADClient::FILTER_EQUAL);
174 $this->assertArrayHasKey('m.albro', $users, 'user should be in gamma nested');
179 $client = $this->getClient();
180 $users = $client->getFilteredUsers(['grps' => 'domain users'], ADClient::FILTER_EQUAL);
181 $this->assertGreaterThan(250, count($users));
183 $users = $client->getFilteredUsers(['grps' => 'domain'], ADClient::FILTER_STARTSWITH);
184 $this->assertGreaterThan(250, count($users));
189 $client = $this->getClient();
191 … $this->assertTrue($client->setPassword('x.guiu', 'Shibol eTH876?!'), 'Password set as admin');
194 $this->assertTrue($client->authenticate('x.guiu', 'Shibol eTH876?!'), 'Password works');
197 …$this->assertTrue($client->setPassword('x.guiu', 'Fully New 1234??', 'Shibol eTH876?!'), 'Password…
200 … $this->assertTrue($client->authenticate('x.guiu', 'Fully New 1234??'), 'New Password works');
203 $client = $this->getClient();
204 … $this->assertTrue($client->setPassword('x.guiu', 'Foo_b_ar123!'), 'Password set back as admin');
209 $client = $this->getClient();
210 $maxAge = $client->getMaxPasswordAge(false);
215 $this->assertEquals(42, $maxAge, 'Default password age is 42 days');
222 // $client = $this->getClient();
225 // $result = $this->callInaccessibleMethod(
230 // $entries = $result->getEntries();
231 // $this->assertEquals(1, $entries->count());
232 // $this->assertEquals('Gamma Nested', ($entries->first()->get('name')->getValues())[0]);