Introduce IDatabase::buildIntegerCast
[lhc/web/wiklou.git] / tests / phpunit / includes / libs / rdbms / database / DatabaseMysqlBaseTest.php
index 14c7057..1d948d7 100644 (file)
@@ -604,4 +604,14 @@ class DatabaseMysqlBaseTest extends PHPUnit\Framework\TestCase {
 
                ];
        }
+
+       /**
+        * @covers \Wikimedia\Rdbms\DatabaseMysqlBase::buildIntegerCast
+        */
+       public function testBuildIntegerCast() {
+               $db = new FakeDatabaseMysqlBase();
+               $output = $db->buildIntegerCast( 'fieldName' );
+               $this->assertSame( 'CAST( fieldName AS SIGNED )', $output );
+       }
+
 }