Skip to content

Commit

Permalink
FixtureBuilder: Return strval of random varchar data
Browse files Browse the repository at this point in the history
  • Loading branch information
ginatrapani committed Sep 8, 2012
1 parent 13a97b6 commit 58da53b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/fixtures/class.FixtureBuilder.php
Expand Up @@ -290,15 +290,15 @@ public function genString($length = 0) {
"n","p","q","r","s","t","u","v","w","x","y","z",
"A","B","C","D","E","F","G","H","J","K","L","M",
"N","P","Q","R","S","T","U","V","W","X","Y","Z",
"1","2","3","4","5","6","7","8","9", "0", " ");
"1","2","3","4","5","6","7","8","9", " ");

$length = $length > 0 ? $length : $this->DATA_DEFAULTS['varchar'];
$length = rand(1, $length);
$string = '';
for($i = 0; $i < $length; $i++) {
$string .= $characters[mt_rand(0, count($characters)-1)];
}
return $string;
return strval($string);
}

/*
Expand Down

0 comments on commit 58da53b

Please sign in to comment.