assertEquals('CAST('.$field.' AS UNSIGNED)', zbx_dbcast_2bigint($field)); $DB = $oldDB; } /** * @dataProvider provider */ public function test_oracle($field) { global $DB; $oldDB = $DB; $DB['TYPE'] = ZBX_DB_ORACLE; $this->assertEquals('CAST('.$field.' AS NUMBER(20))', zbx_dbcast_2bigint($field)); $DB = $oldDB; } /** * @dataProvider provider */ public function test_postgresql($field) { global $DB; $oldDB = $DB; $DB['TYPE'] = ZBX_DB_POSTGRESQL; $this->assertEquals('CAST('.$field.' AS BIGINT)', zbx_dbcast_2bigint($field)); $DB = $oldDB; } }