Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Adding a randomString of given length. #246

Closed
wants to merge 1 commit into from

Conversation

iammichiel
Copy link

In some cases, it might be interesting to test methods/forms/screens with an oversized string.

@fzaninotto
Copy link
Owner

@iammichiel
Copy link
Author

In my use case, I needed a string without spaces. The text method returns a string with spaces.

@fzaninotto
Copy link
Owner

Then you should update the text() provider with an option.

@Anahkiasen
Copy link

This would be useful to generate passwords and such, I'm currently using word but it's not ideal.

@fzaninotto
Copy link
Owner

for passwords, see #402.

@fzaninotto
Copy link
Owner

This can be achieved using a simple lexify with an str_repeat (see the example at

$pattern = str_repeat('*', $this->numberBetween($minLength, $maxLength));
).

@fzaninotto fzaninotto closed this Aug 25, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants