public function ForcePasswordChangeServiceTest::testGetLastChangeForRole in Force Password Change 2.0.x
Same name and namespace in other branches
- 8 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 235
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');
}