Prose\UsingUsers::saveUsersToFile PHP Метод

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
    public function saveUsersToFile($users, $filename)
    {
        // what are we doing?
        $log = usingLog()->startAction("save test users to file '{$filename}'");
        // save the contents
        file_put_contents($filename, json_encode($users, JSON_PRETTY_PRINT));
        // all done
        $count = count(get_object_vars($users));
        $log->endAction("saved {$count} test user(s)");
    }