mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Updated MemberTest to work with a standard array iterator.
This commit is contained in:
parent
26faead3e5
commit
04e30243d0
@ -140,18 +140,18 @@ class MemberTest extends FunctionalTest {
|
|||||||
|
|
||||||
$passwords = DataObject::get("MemberPassword", "\"MemberID\" = $member->ID", "\"Created\" DESC, \"ID\" DESC")->getIterator();
|
$passwords = DataObject::get("MemberPassword", "\"MemberID\" = $member->ID", "\"Created\" DESC, \"ID\" DESC")->getIterator();
|
||||||
$this->assertNotNull($passwords);
|
$this->assertNotNull($passwords);
|
||||||
$record = $passwords->rewind();
|
$passwords->rewind();
|
||||||
$this->assertTrue($record->checkPassword('test3'), "Password test3 not found in MemberRecord");
|
$this->assertTrue($passwords->current()->checkPassword('test3'), "Password test3 not found in MemberRecord");
|
||||||
|
|
||||||
$record = $passwords->next();
|
$passwords->next();
|
||||||
$this->assertTrue($record->checkPassword('test2'), "Password test2 not found in MemberRecord");
|
$this->assertTrue($passwords->current()->checkPassword('test2'), "Password test2 not found in MemberRecord");
|
||||||
|
|
||||||
$record = $passwords->next();
|
$passwords->next();
|
||||||
$this->assertTrue($record->checkPassword('test1'), "Password test1 not found in MemberRecord");
|
$this->assertTrue($passwords->current()->checkPassword('test1'), "Password test1 not found in MemberRecord");
|
||||||
|
|
||||||
$record = $passwords->next();
|
$passwords->next();
|
||||||
$this->assertType('DataObject', $record);
|
$this->assertType('DataObject', $passwords->current());
|
||||||
$this->assertTrue($record->checkPassword('1nitialPassword'), "Password 1nitialPassword not found in MemberRecord");
|
$this->assertTrue($passwords->current()->checkPassword('1nitialPassword'), "Password 1nitialPassword not found in MemberRecord");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user