asciiStrings() public static method

creates a generator that produces ASCII strings
public static asciiStrings ( ) : Generator
return Generator
コード例 #1
0
 function testQuickCheckShrink()
 {
     $prop = Gen::forAll([Gen::asciiStrings()], function ($s) {
         return !is_numeric($s);
     });
     $result = Quick::check(1000, $prop);
     $this->assertFalse($result['result']);
     $smallest = $result['shrunk']['smallest'][0];
     $this->assertEquals('0', $smallest, "expected smallest to be '0' but got '{$smallest}'");
 }