public function ForcePasswordChangeServiceTest::testGetLastChangeForRole in Force Password Change 8
Same name and namespace in other branches
- 2.0.x tests/src/Unit/Service/ForcePasswordChangeServiceTest.php \Drupal\Tests\force_password_change\Unit\Service\ForcePasswordChangeServiceTest::testGetLastChangeForRole()
* @covers ::getLastChangeForRole
File
- tests/
src/ Unit/ Service/ ForcePasswordChangeServiceTest.php, line 217
Class
- ForcePasswordChangeServiceTest
- @coversDefaultClass \Drupal\force_password_change\Service\ForcePasswordChangeService @group force_password_change
Namespace
Drupal\Tests\force_password_change\Unit\ServiceCode
public function testGetLastChangeForRole() {
$this->mapper
->expects($this
->at(0))
->method('getLastChangeForRole')
->with('admin')
->willReturn(100);
$rid = 'admin';
$value = $this->forcePasswordChangeService
->getLastChangeForRole($rid);
$this
->assertEquals(100, $value, 'The last changed value is properly returned');
}