コード例 #1
0
ファイル: example.php プロジェクト: chonla/randomizr
<?php

require_once __DIR__ . '/../vendor/autoload.php';
use Chonla\Randomizr\Randomizr;
$rnd = new Randomizr();
echo $rnd->number(10) . "\n";
echo $rnd->alphabet(10) . "\n";
echo $rnd->alphanumeric(10) . "\n";
echo $rnd->hexadecimal(10) . "\n";
コード例 #2
0
ファイル: RandomizrTest.php プロジェクト: chonla/randomizr
 public function testRandShouldReturnOnlyCharacterInDomain()
 {
     $rand = new Randomizr();
     $return = $rand->rand('a', 9);
     $this->assertEquals('aaaaaaaaa', $return);
 }