Introduce IDatabase::buildIntegerCast
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / rdbms / database / DatabaseSQLTest.php
index b3c8cce..0f47595 100644 (file)
@@ -1249,4 +1249,12 @@ class DatabaseSQLTest extends PHPUnit\Framework\TestCase {
                $this->database->buildSubstring( 'foo', $start, $length );
        }
 
+       /**
+        * @covers \Wikimedia\Rdbms\Database::buildIntegerCast
+        */
+       public function testBuildIntegerCast() {
+               $output = $this->database->buildIntegerCast( 'fieldName' );
+               $this->assertSame( 'CAST( fieldName AS INTEGER )', $output );
+       }
+
 }