]> source.dussan.org Git - nextcloud-server.git/commitdiff
add missing quotes + field declarations
authorThomas Müller <thomas.mueller@tmit.eu>
Tue, 17 Dec 2013 09:05:20 +0000 (10:05 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Tue, 17 Dec 2013 09:05:20 +0000 (10:05 +0100)
tests/lib/db.php

index 6b6d6b91088e1e4b7609f18fdace088774d34963..3fcdf8a7dc654cd968f7559ce1e7797c3b58cc7d 100644 (file)
@@ -12,6 +12,21 @@ class Test_DB extends PHPUnit_Framework_TestCase {
        protected static $schema_file = 'static://test_db_scheme';
        protected $test_prefix;
 
+       /**
+        * @var string
+        */
+       private $table1;
+
+       /**
+        * @var string
+        */
+       private $table2;
+
+       /**
+        * @var string
+        */
+       private $table3;
+
        public function setUp() {
                $dbfile = OC::$SERVERROOT.'/tests/data/db_structure.xml';
 
@@ -154,7 +169,7 @@ class Test_DB extends PHPUnit_Framework_TestCase {
                $result = $query->execute(array($expected, 'uri_1', 'This is a vCard'));
                $this->assertEquals(1, $result);
 
-               $actual = OC_DB::prepare("SELECT `fullname` FROM $table")->execute()->fetchOne();
+               $actual = OC_DB::prepare("SELECT `fullname` FROM `$table`")->execute()->fetchOne();
                $this->assertSame($expected, $actual);
        }
 }