1--TEST--
2curl_setopt() basic parameter test
3--CREDITS--
4Paul Sohier
5#phptestfest utrecht
6--EXTENSIONS--
7curl
8--FILE--
9<?php
10echo "*** curl_setopt() call with incorrect parameters\n";
11$ch = curl_init();
12
13try {
14    curl_setopt($ch, '', false);
15} catch (TypeError $e) {
16    echo $e->getMessage(), "\n";
17}
18
19try {
20    curl_setopt($ch, -10, 0);
21} catch (ValueError $e) {
22    echo $e->getMessage(), "\n";
23}
24
25try {
26    curl_setopt($ch, 1000, 0);
27} catch (ValueError $e) {
28    echo $e->getMessage(), "\n";
29}
30
31?>
32--EXPECT--
33*** curl_setopt() call with incorrect parameters
34curl_setopt(): Argument #2 ($option) must be of type int, string given
35curl_setopt(): Argument #2 ($option) is not a valid cURL option
36curl_setopt(): Argument #2 ($option) is not a valid cURL option
37