forked from gtkforphp/cairo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__construct.phpt
More file actions
77 lines (70 loc) · 2.02 KB
/
Copy path__construct.phpt
File metadata and controls
77 lines (70 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
--TEST--
new CairoMatrix [__construct() method ]
--SKIPIF--
<?php
if(!extension_loaded('cairo')) die('skip - Cairo extension not available');
?>
--FILE--
<?php
$matrix = new CairoMatrix();
var_dump($matrix);
/* Wrong number args - can only have too many, any number between 0 and 6 is fine */
try {
new CairoMatrix(1, 1, 1, 1, 1, 1, 1);
trigger_error('We should bomb here');
} catch (CairoException $e) {
echo $e->getMessage(), PHP_EOL;
}
/* Wrong arg type 1 */
try {
new CairoMatrix(array());
trigger_error('We should bomb here');
} catch (CairoException $e) {
echo $e->getMessage(), PHP_EOL;
}
/* Wrong arg type 2 */
try {
new CairoMatrix(1, array());
trigger_error('We should bomb here');
} catch (CairoException $e) {
echo $e->getMessage(), PHP_EOL;
}
/* Wrong arg type 3 */
try {
new CairoMatrix(1, 1, array());
trigger_error('We should bomb here');
} catch (CairoException $e) {
echo $e->getMessage(), PHP_EOL;
}
/* Wrong arg type 4 */
try {
new CairoMatrix(1, 1, 1, array());
trigger_error('We should bomb here');
} catch (CairoException $e) {
echo $e->getMessage(), PHP_EOL;
}
/* Wrong arg type 5 */
try {
new CairoMatrix(1, 1, 1, 1, array());
trigger_error('We should bomb here');
} catch (CairoException $e) {
echo $e->getMessage(), PHP_EOL;
}
/* Wrong arg type 6 */
try {
new CairoMatrix(1, 1, 1, 1, 1, array());
trigger_error('We should bomb here');
} catch (CairoException $e) {
echo $e->getMessage(), PHP_EOL;
}
?>
--EXPECTF--
object(CairoMatrix)#%d (0) {
}
CairoMatrix::__construct() expects at most 6 parameters, 7 given
CairoMatrix::__construct() expects parameter 1 to be double, array given
CairoMatrix::__construct() expects parameter 2 to be double, array given
CairoMatrix::__construct() expects parameter 3 to be double, array given
CairoMatrix::__construct() expects parameter 4 to be double, array given
CairoMatrix::__construct() expects parameter 5 to be double, array given
CairoMatrix::__construct() expects parameter 6 to be double, array given