1--TEST--
2odbc_data_source(): Basic test
3--EXTENSIONS--
4odbc
5--SKIPIF--
6<?php
7    include 'skipif.inc';
8    if (odbc_data_source($conn, SQL_FETCH_FIRST) === NULL) {
9        die("skip no data sources defined on this system");
10    }
11?>
12--FILE--
13<?php
14
15include 'config.inc';
16
17$conn = odbc_connect($dsn, $user, $pass);
18
19try {
20    var_dump(odbc_data_source($conn, SQL_FETCH_FIRST + SQL_FETCH_NEXT));
21} catch (\ValueError $e) {
22    echo $e->getMessage() . \PHP_EOL;
23}
24var_dump(odbc_data_source($conn, SQL_FETCH_FIRST));
25
26?>
27--EXPECTF--
28odbc_data_source(): Argument #2 ($fetch_type) must be either SQL_FETCH_FIRST or SQL_FETCH_NEXT
29array(%d) {
30%a
31}
32