number as number
This commit is contained in:
parent
bea80ffe20
commit
addd0fba38
|
@ -30,7 +30,7 @@ class Test_DB extends PHPUnit_Framework_TestCase {
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
$dbfile = OC::$SERVERROOT.'/tests/data/db_structure.xml';
|
$dbfile = OC::$SERVERROOT.'/tests/data/db_structure.xml';
|
||||||
|
|
||||||
$r = '_'.OC_Util::generateRandomBytes('4').'_';
|
$r = '_'.OC_Util::generateRandomBytes(4).'_';
|
||||||
$content = file_get_contents( $dbfile );
|
$content = file_get_contents( $dbfile );
|
||||||
$content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content );
|
$content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content );
|
||||||
file_put_contents( self::$schema_file, $content );
|
file_put_contents( self::$schema_file, $content );
|
||||||
|
|
|
@ -16,7 +16,7 @@ class Test_DBSchema extends PHPUnit_Framework_TestCase {
|
||||||
$dbfile = OC::$SERVERROOT.'/tests/data/db_structure.xml';
|
$dbfile = OC::$SERVERROOT.'/tests/data/db_structure.xml';
|
||||||
$dbfile2 = OC::$SERVERROOT.'/tests/data/db_structure2.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 = file_get_contents( $dbfile );
|
||||||
$content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content );
|
$content = str_replace( '*dbprefix*', '*dbprefix*'.$r, $content );
|
||||||
file_put_contents( $this->schema_file, $content );
|
file_put_contents( $this->schema_file, $content );
|
||||||
|
|
Loading…
Reference in New Issue