PHP Класс Prose\UsingUsers

Автор: Stuart Herbert ([email protected])
Наследование: extends Prose
Показать файл Открыть проект

Открытые методы

Метод Описание
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