PHP 클래스 Prose\UsingUsers

저자: Stuart Herbert ([email protected])
상속: extends Prose
파일 보기 프로젝트 열기: datasift/storyplayer

공개 메소드들

메소드 설명
loadUsersFromFile ( string $filename ) : DataSift\Stone\ObjectLib\BaseObject load test users from the given filename
saveUsersToFile ( DataSift\Stone\ObjectLib\BaseObject $users, string $filename ) : void save test users to disk
setUsersFileIsReadOnly ( ) tell Storyplayer that test users loaded via the --users switch must not be saved back to disk when the stories are over

메소드 상세

loadUsersFromFile() 공개 메소드

NOTES: - Storyplayer calls this for you when you use the --users switch - it is safe to call this yourself from a story if you want to load additional users for any reason. however, Storyplayer will not manage saving these users for you - you WILL have to do that yourself
public loadUsersFromFile ( string $filename ) : DataSift\Stone\ObjectLib\BaseObject
$filename string the JSON file to load users from
리턴 DataSift\Stone\ObjectLib\BaseObject

saveUsersToFile() 공개 메소드

NOTES: - Storyplayer calls this for you when all tests have completed - if you've loaded test users yourself inside your test, you'll need to call this method to save those test users
public saveUsersToFile ( DataSift\Stone\ObjectLib\BaseObject $users, string $filename ) : void
$users DataSift\Stone\ObjectLib\BaseObject the test users to save to disk
$filename string the filename to save to
리턴 void

setUsersFileIsReadOnly() 공개 메소드

NOTES: - Storyplayer calls this for you if you use the --read-only-users switch, or put 'moduleSettings.users.readOnly' in your test environment config - this setting has no effect if you call saveUsersToFile() manually