diff --git a/tests/lib/db.php b/tests/lib/db.php
index f0b271a36f1e7b71dd56f495e98b91f0e5fff618..2fca67b56383bd84d28f1ed4107e9872b8d760d4 100644
--- a/tests/lib/db.php
+++ b/tests/lib/db.php
@@ -30,7 +30,7 @@ class Test_DB extends PHPUnit_Framework_TestCase {
 	public function setUp() {
 		$dbfile = OC::$SERVERROOT.'/tests/data/db_structure.xml';
 
-		$r = '_'.OC_Util::generateRandomBytes('4').'_';
+		$r = '_'.OC_Util::generateRandomBytes(4).'_';
 		$content = file_get_contents( $dbfile );
 		$content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content );
 		file_put_contents( self::$schema_file, $content );
diff --git a/tests/lib/dbschema.php b/tests/lib/dbschema.php
index 4a7b7f7aac0ef4ecc70c7f78fa1de82acfdbab04..e8a4353800495927644424c7102f4764e56fc26b 100644
--- a/tests/lib/dbschema.php
+++ b/tests/lib/dbschema.php
@@ -16,7 +16,7 @@ class Test_DBSchema extends PHPUnit_Framework_TestCase {
 		$dbfile = OC::$SERVERROOT.'/tests/data/db_structure.xml';
 		$dbfile2 = OC::$SERVERROOT.'/tests/data/db_structure2.xml';
 
-		$r = '_'.OC_Util::generateRandomBytes('4').'_';
+		$r = '_'.OC_Util::generateRandomBytes(4).'_';
 		$content = file_get_contents( $dbfile );
 		$content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content );
 		file_put_contents( $this->schema_file, $content );