corex / testing
This package is abandoned and no longer maintained.
No replacement package was suggested.
Testing (Data, Faker, etc....)
1.1.1
2019-05-06 17:12 UTC
Requires
- php: ^7.2
- fzaninotto/faker: ^1.8
Requires (Dev)
- corex/helpers: ^2.0
- phpunit/phpunit: ^8.1
This package is auto-updated.
Last update: 2023-09-16 10:30:52 UTC
README
This package is using package fzaninotto/faker as base. A few basic static methods has been added for easy access + a little more.
Easy access to Faker
Faker can easily be reached through singleton method faker(). Documentation for Faker can be found on https://packagist.org/packages/fzaninotto/faker
$faker = TestData::faker(); $faker->...
Available static methods.
// Get random number. $number = TestData::number(); // Get random number between 10 and 20. $number = TestData::number(10, 20); // Get random string (alpha + numeric) 20 characters long. $string = TestData::string(); // Get random string (alpha + numeric) 10 characters long. $string = TestData::string(10); // Get random string (alpha). $string = TestData::stringAlpha(); // Get random string (alpha) 10 characters long (uppercase). $string = TestData::stringAlpha(10, true); // Get random string (numeric) 16 characters long (uppercase). $string = TestData::stringNumeric(16, true); // Get list of numbers from 10 to 20 as array. $numbers = TestData::numbers(10, 20); // Get 20 (default 10) people (id, firstname and lastname). $people = TestData::people(20);