Version 1
[yaffs-website] / vendor / phpunit / phpunit / src / Framework / Assert / Functions.php
1 <?php
2 /*
3  * This file is part of PHPUnit.
4  *
5  * (c) Sebastian Bergmann <sebastian@phpunit.de>
6  *
7  * For the full copyright and license information, please view the LICENSE
8  * file that was distributed with this source code.
9  */
10
11 /**
12  * Returns a matcher that matches when the method is executed
13  * zero or more times.
14  *
15  * @return PHPUnit_Framework_MockObject_Matcher_AnyInvokedCount
16  *
17  * @since  Method available since Release 3.0.0
18  */
19 function any()
20 {
21     return call_user_func_array(
22         'PHPUnit_Framework_TestCase::any',
23         func_get_args()
24     );
25 }
26
27 /**
28  * Returns a PHPUnit_Framework_Constraint_IsAnything matcher object.
29  *
30  * @return PHPUnit_Framework_Constraint_IsAnything
31  *
32  * @since  Method available since Release 3.0.0
33  */
34 function anything()
35 {
36     return call_user_func_array(
37         'PHPUnit_Framework_Assert::anything',
38         func_get_args()
39     );
40 }
41
42 /**
43  * Returns a PHPUnit_Framework_Constraint_ArrayHasKey matcher object.
44  *
45  * @param mixed $key
46  *
47  * @return PHPUnit_Framework_Constraint_ArrayHasKey
48  *
49  * @since  Method available since Release 3.0.0
50  */
51 function arrayHasKey($key)
52 {
53     return call_user_func_array(
54         'PHPUnit_Framework_Assert::arrayHasKey',
55         func_get_args()
56     );
57 }
58
59 /**
60  * Asserts that an array has a specified key.
61  *
62  * @param mixed             $key
63  * @param array|ArrayAccess $array
64  * @param string            $message
65  *
66  * @since  Method available since Release 3.0.0
67  */
68 function assertArrayHasKey($key, $array, $message = '')
69 {
70     return call_user_func_array(
71         'PHPUnit_Framework_Assert::assertArrayHasKey',
72         func_get_args()
73     );
74 }
75
76 /**
77  * Asserts that an array has a specified subset.
78  *
79  * @param array|ArrayAccess $subset
80  * @param array|ArrayAccess $array
81  * @param bool              $strict  Check for object identity
82  * @param string            $message
83  *
84  * @since Method available since Release 4.4.0
85  */
86 function assertArraySubset($subset, $array, $strict = false, $message = '')
87 {
88     return call_user_func_array(
89         'PHPUnit_Framework_Assert::assertArraySubset',
90         func_get_args()
91     );
92 }
93
94 /**
95  * Asserts that an array does not have a specified key.
96  *
97  * @param mixed             $key
98  * @param array|ArrayAccess $array
99  * @param string            $message
100  *
101  * @since  Method available since Release 3.0.0
102  */
103 function assertArrayNotHasKey($key, $array, $message = '')
104 {
105     return call_user_func_array(
106         'PHPUnit_Framework_Assert::assertArrayNotHasKey',
107         func_get_args()
108     );
109 }
110
111 /**
112  * Asserts that a haystack that is stored in a static attribute of a class
113  * or an attribute of an object contains a needle.
114  *
115  * @param mixed  $needle
116  * @param string $haystackAttributeName
117  * @param mixed  $haystackClassOrObject
118  * @param string $message
119  * @param bool   $ignoreCase
120  * @param bool   $checkForObjectIdentity
121  * @param bool   $checkForNonObjectIdentity
122  *
123  * @since  Method available since Release 3.0.0
124  */
125 function assertAttributeContains($needle, $haystackAttributeName, $haystackClassOrObject, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
126 {
127     return call_user_func_array(
128         'PHPUnit_Framework_Assert::assertAttributeContains',
129         func_get_args()
130     );
131 }
132
133 /**
134  * Asserts that a haystack that is stored in a static attribute of a class
135  * or an attribute of an object contains only values of a given type.
136  *
137  * @param string $type
138  * @param string $haystackAttributeName
139  * @param mixed  $haystackClassOrObject
140  * @param bool   $isNativeType
141  * @param string $message
142  *
143  * @since  Method available since Release 3.1.4
144  */
145 function assertAttributeContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType = null, $message = '')
146 {
147     return call_user_func_array(
148         'PHPUnit_Framework_Assert::assertAttributeContainsOnly',
149         func_get_args()
150     );
151 }
152
153 /**
154  * Asserts the number of elements of an array, Countable or Traversable
155  * that is stored in an attribute.
156  *
157  * @param int    $expectedCount
158  * @param string $haystackAttributeName
159  * @param mixed  $haystackClassOrObject
160  * @param string $message
161  *
162  * @since Method available since Release 3.6.0
163  */
164 function assertAttributeCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message = '')
165 {
166     return call_user_func_array(
167         'PHPUnit_Framework_Assert::assertAttributeCount',
168         func_get_args()
169     );
170 }
171
172 /**
173  * Asserts that a static attribute of a class or an attribute of an object
174  * is empty.
175  *
176  * @param string $haystackAttributeName
177  * @param mixed  $haystackClassOrObject
178  * @param string $message
179  *
180  * @since Method available since Release 3.5.0
181  */
182 function assertAttributeEmpty($haystackAttributeName, $haystackClassOrObject, $message = '')
183 {
184     return call_user_func_array(
185         'PHPUnit_Framework_Assert::assertAttributeEmpty',
186         func_get_args()
187     );
188 }
189
190 /**
191  * Asserts that a variable is equal to an attribute of an object.
192  *
193  * @param mixed  $expected
194  * @param string $actualAttributeName
195  * @param string $actualClassOrObject
196  * @param string $message
197  * @param float  $delta
198  * @param int    $maxDepth
199  * @param bool   $canonicalize
200  * @param bool   $ignoreCase
201  */
202 function assertAttributeEquals($expected, $actualAttributeName, $actualClassOrObject, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
203 {
204     return call_user_func_array(
205         'PHPUnit_Framework_Assert::assertAttributeEquals',
206         func_get_args()
207     );
208 }
209
210 /**
211  * Asserts that an attribute is greater than another value.
212  *
213  * @param mixed  $expected
214  * @param string $actualAttributeName
215  * @param string $actualClassOrObject
216  * @param string $message
217  *
218  * @since  Method available since Release 3.1.0
219  */
220 function assertAttributeGreaterThan($expected, $actualAttributeName, $actualClassOrObject, $message = '')
221 {
222     return call_user_func_array(
223         'PHPUnit_Framework_Assert::assertAttributeGreaterThan',
224         func_get_args()
225     );
226 }
227
228 /**
229  * Asserts that an attribute is greater than or equal to another value.
230  *
231  * @param mixed  $expected
232  * @param string $actualAttributeName
233  * @param string $actualClassOrObject
234  * @param string $message
235  *
236  * @since  Method available since Release 3.1.0
237  */
238 function assertAttributeGreaterThanOrEqual($expected, $actualAttributeName, $actualClassOrObject, $message = '')
239 {
240     return call_user_func_array(
241         'PHPUnit_Framework_Assert::assertAttributeGreaterThanOrEqual',
242         func_get_args()
243     );
244 }
245
246 /**
247  * Asserts that an attribute is of a given type.
248  *
249  * @param string $expected
250  * @param string $attributeName
251  * @param mixed  $classOrObject
252  * @param string $message
253  *
254  * @since Method available since Release 3.5.0
255  */
256 function assertAttributeInstanceOf($expected, $attributeName, $classOrObject, $message = '')
257 {
258     return call_user_func_array(
259         'PHPUnit_Framework_Assert::assertAttributeInstanceOf',
260         func_get_args()
261     );
262 }
263
264 /**
265  * Asserts that an attribute is of a given type.
266  *
267  * @param string $expected
268  * @param string $attributeName
269  * @param mixed  $classOrObject
270  * @param string $message
271  *
272  * @since Method available since Release 3.5.0
273  */
274 function assertAttributeInternalType($expected, $attributeName, $classOrObject, $message = '')
275 {
276     return call_user_func_array(
277         'PHPUnit_Framework_Assert::assertAttributeInternalType',
278         func_get_args()
279     );
280 }
281
282 /**
283  * Asserts that an attribute is smaller than another value.
284  *
285  * @param mixed  $expected
286  * @param string $actualAttributeName
287  * @param string $actualClassOrObject
288  * @param string $message
289  *
290  * @since  Method available since Release 3.1.0
291  */
292 function assertAttributeLessThan($expected, $actualAttributeName, $actualClassOrObject, $message = '')
293 {
294     return call_user_func_array(
295         'PHPUnit_Framework_Assert::assertAttributeLessThan',
296         func_get_args()
297     );
298 }
299
300 /**
301  * Asserts that an attribute is smaller than or equal to another value.
302  *
303  * @param mixed  $expected
304  * @param string $actualAttributeName
305  * @param string $actualClassOrObject
306  * @param string $message
307  *
308  * @since  Method available since Release 3.1.0
309  */
310 function assertAttributeLessThanOrEqual($expected, $actualAttributeName, $actualClassOrObject, $message = '')
311 {
312     return call_user_func_array(
313         'PHPUnit_Framework_Assert::assertAttributeLessThanOrEqual',
314         func_get_args()
315     );
316 }
317
318 /**
319  * Asserts that a haystack that is stored in a static attribute of a class
320  * or an attribute of an object does not contain a needle.
321  *
322  * @param mixed  $needle
323  * @param string $haystackAttributeName
324  * @param mixed  $haystackClassOrObject
325  * @param string $message
326  * @param bool   $ignoreCase
327  * @param bool   $checkForObjectIdentity
328  * @param bool   $checkForNonObjectIdentity
329  *
330  * @since  Method available since Release 3.0.0
331  */
332 function assertAttributeNotContains($needle, $haystackAttributeName, $haystackClassOrObject, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
333 {
334     return call_user_func_array(
335         'PHPUnit_Framework_Assert::assertAttributeNotContains',
336         func_get_args()
337     );
338 }
339
340 /**
341  * Asserts that a haystack that is stored in a static attribute of a class
342  * or an attribute of an object does not contain only values of a given
343  * type.
344  *
345  * @param string $type
346  * @param string $haystackAttributeName
347  * @param mixed  $haystackClassOrObject
348  * @param bool   $isNativeType
349  * @param string $message
350  *
351  * @since  Method available since Release 3.1.4
352  */
353 function assertAttributeNotContainsOnly($type, $haystackAttributeName, $haystackClassOrObject, $isNativeType = null, $message = '')
354 {
355     return call_user_func_array(
356         'PHPUnit_Framework_Assert::assertAttributeNotContainsOnly',
357         func_get_args()
358     );
359 }
360
361 /**
362  * Asserts the number of elements of an array, Countable or Traversable
363  * that is stored in an attribute.
364  *
365  * @param int    $expectedCount
366  * @param string $haystackAttributeName
367  * @param mixed  $haystackClassOrObject
368  * @param string $message
369  *
370  * @since Method available since Release 3.6.0
371  */
372 function assertAttributeNotCount($expectedCount, $haystackAttributeName, $haystackClassOrObject, $message = '')
373 {
374     return call_user_func_array(
375         'PHPUnit_Framework_Assert::assertAttributeNotCount',
376         func_get_args()
377     );
378 }
379
380 /**
381  * Asserts that a static attribute of a class or an attribute of an object
382  * is not empty.
383  *
384  * @param string $haystackAttributeName
385  * @param mixed  $haystackClassOrObject
386  * @param string $message
387  *
388  * @since Method available since Release 3.5.0
389  */
390 function assertAttributeNotEmpty($haystackAttributeName, $haystackClassOrObject, $message = '')
391 {
392     return call_user_func_array(
393         'PHPUnit_Framework_Assert::assertAttributeNotEmpty',
394         func_get_args()
395     );
396 }
397
398 /**
399  * Asserts that a variable is not equal to an attribute of an object.
400  *
401  * @param mixed  $expected
402  * @param string $actualAttributeName
403  * @param string $actualClassOrObject
404  * @param string $message
405  * @param float  $delta
406  * @param int    $maxDepth
407  * @param bool   $canonicalize
408  * @param bool   $ignoreCase
409  */
410 function assertAttributeNotEquals($expected, $actualAttributeName, $actualClassOrObject, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
411 {
412     return call_user_func_array(
413         'PHPUnit_Framework_Assert::assertAttributeNotEquals',
414         func_get_args()
415     );
416 }
417
418 /**
419  * Asserts that an attribute is of a given type.
420  *
421  * @param string $expected
422  * @param string $attributeName
423  * @param mixed  $classOrObject
424  * @param string $message
425  *
426  * @since Method available since Release 3.5.0
427  */
428 function assertAttributeNotInstanceOf($expected, $attributeName, $classOrObject, $message = '')
429 {
430     return call_user_func_array(
431         'PHPUnit_Framework_Assert::assertAttributeNotInstanceOf',
432         func_get_args()
433     );
434 }
435
436 /**
437  * Asserts that an attribute is of a given type.
438  *
439  * @param string $expected
440  * @param string $attributeName
441  * @param mixed  $classOrObject
442  * @param string $message
443  *
444  * @since Method available since Release 3.5.0
445  */
446 function assertAttributeNotInternalType($expected, $attributeName, $classOrObject, $message = '')
447 {
448     return call_user_func_array(
449         'PHPUnit_Framework_Assert::assertAttributeNotInternalType',
450         func_get_args()
451     );
452 }
453
454 /**
455  * Asserts that a variable and an attribute of an object do not have the
456  * same type and value.
457  *
458  * @param mixed  $expected
459  * @param string $actualAttributeName
460  * @param object $actualClassOrObject
461  * @param string $message
462  */
463 function assertAttributeNotSame($expected, $actualAttributeName, $actualClassOrObject, $message = '')
464 {
465     return call_user_func_array(
466         'PHPUnit_Framework_Assert::assertAttributeNotSame',
467         func_get_args()
468     );
469 }
470
471 /**
472  * Asserts that a variable and an attribute of an object have the same type
473  * and value.
474  *
475  * @param mixed  $expected
476  * @param string $actualAttributeName
477  * @param object $actualClassOrObject
478  * @param string $message
479  */
480 function assertAttributeSame($expected, $actualAttributeName, $actualClassOrObject, $message = '')
481 {
482     return call_user_func_array(
483         'PHPUnit_Framework_Assert::assertAttributeSame',
484         func_get_args()
485     );
486 }
487
488 /**
489  * Asserts that a class has a specified attribute.
490  *
491  * @param string $attributeName
492  * @param string $className
493  * @param string $message
494  *
495  * @since  Method available since Release 3.1.0
496  */
497 function assertClassHasAttribute($attributeName, $className, $message = '')
498 {
499     return call_user_func_array(
500         'PHPUnit_Framework_Assert::assertClassHasAttribute',
501         func_get_args()
502     );
503 }
504
505 /**
506  * Asserts that a class has a specified static attribute.
507  *
508  * @param string $attributeName
509  * @param string $className
510  * @param string $message
511  *
512  * @since  Method available since Release 3.1.0
513  */
514 function assertClassHasStaticAttribute($attributeName, $className, $message = '')
515 {
516     return call_user_func_array(
517         'PHPUnit_Framework_Assert::assertClassHasStaticAttribute',
518         func_get_args()
519     );
520 }
521
522 /**
523  * Asserts that a class does not have a specified attribute.
524  *
525  * @param string $attributeName
526  * @param string $className
527  * @param string $message
528  *
529  * @since  Method available since Release 3.1.0
530  */
531 function assertClassNotHasAttribute($attributeName, $className, $message = '')
532 {
533     return call_user_func_array(
534         'PHPUnit_Framework_Assert::assertClassNotHasAttribute',
535         func_get_args()
536     );
537 }
538
539 /**
540  * Asserts that a class does not have a specified static attribute.
541  *
542  * @param string $attributeName
543  * @param string $className
544  * @param string $message
545  *
546  * @since  Method available since Release 3.1.0
547  */
548 function assertClassNotHasStaticAttribute($attributeName, $className, $message = '')
549 {
550     return call_user_func_array(
551         'PHPUnit_Framework_Assert::assertClassNotHasStaticAttribute',
552         func_get_args()
553     );
554 }
555
556 /**
557  * Asserts that a haystack contains a needle.
558  *
559  * @param mixed  $needle
560  * @param mixed  $haystack
561  * @param string $message
562  * @param bool   $ignoreCase
563  * @param bool   $checkForObjectIdentity
564  * @param bool   $checkForNonObjectIdentity
565  *
566  * @since  Method available since Release 2.1.0
567  */
568 function assertContains($needle, $haystack, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
569 {
570     return call_user_func_array(
571         'PHPUnit_Framework_Assert::assertContains',
572         func_get_args()
573     );
574 }
575
576 /**
577  * Asserts that a haystack contains only values of a given type.
578  *
579  * @param string $type
580  * @param mixed  $haystack
581  * @param bool   $isNativeType
582  * @param string $message
583  *
584  * @since  Method available since Release 3.1.4
585  */
586 function assertContainsOnly($type, $haystack, $isNativeType = null, $message = '')
587 {
588     return call_user_func_array(
589         'PHPUnit_Framework_Assert::assertContainsOnly',
590         func_get_args()
591     );
592 }
593
594 /**
595  * Asserts that a haystack contains only instances of a given classname
596  *
597  * @param string            $classname
598  * @param array|Traversable $haystack
599  * @param string            $message
600  */
601 function assertContainsOnlyInstancesOf($classname, $haystack, $message = '')
602 {
603     return call_user_func_array(
604         'PHPUnit_Framework_Assert::assertContainsOnlyInstancesOf',
605         func_get_args()
606     );
607 }
608
609 /**
610  * Asserts the number of elements of an array, Countable or Traversable.
611  *
612  * @param int    $expectedCount
613  * @param mixed  $haystack
614  * @param string $message
615  */
616 function assertCount($expectedCount, $haystack, $message = '')
617 {
618     return call_user_func_array(
619         'PHPUnit_Framework_Assert::assertCount',
620         func_get_args()
621     );
622 }
623
624 /**
625  * Asserts that a variable is empty.
626  *
627  * @param mixed  $actual
628  * @param string $message
629  *
630  * @throws PHPUnit_Framework_AssertionFailedError
631  */
632 function assertEmpty($actual, $message = '')
633 {
634     return call_user_func_array(
635         'PHPUnit_Framework_Assert::assertEmpty',
636         func_get_args()
637     );
638 }
639
640 /**
641  * Asserts that a hierarchy of DOMElements matches.
642  *
643  * @param DOMElement $expectedElement
644  * @param DOMElement $actualElement
645  * @param bool       $checkAttributes
646  * @param string     $message
647  *
648  * @since  Method available since Release 3.3.0
649  */
650 function assertEqualXMLStructure(DOMElement $expectedElement, DOMElement $actualElement, $checkAttributes = false, $message = '')
651 {
652     return call_user_func_array(
653         'PHPUnit_Framework_Assert::assertEqualXMLStructure',
654         func_get_args()
655     );
656 }
657
658 /**
659  * Asserts that two variables are equal.
660  *
661  * @param mixed  $expected
662  * @param mixed  $actual
663  * @param string $message
664  * @param float  $delta
665  * @param int    $maxDepth
666  * @param bool   $canonicalize
667  * @param bool   $ignoreCase
668  */
669 function assertEquals($expected, $actual, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
670 {
671     return call_user_func_array(
672         'PHPUnit_Framework_Assert::assertEquals',
673         func_get_args()
674     );
675 }
676
677 /**
678  * Asserts that a condition is not true.
679  *
680  * @param bool   $condition
681  * @param string $message
682  *
683  * @throws PHPUnit_Framework_AssertionFailedError
684  */
685 function assertNotTrue($condition, $message = '')
686 {
687     return call_user_func_array(
688         'PHPUnit_Framework_Assert::assertNotTrue',
689         func_get_args()
690     );
691 }
692
693 /**
694  * Asserts that a condition is false.
695  *
696  * @param bool   $condition
697  * @param string $message
698  *
699  * @throws PHPUnit_Framework_AssertionFailedError
700  */
701 function assertFalse($condition, $message = '')
702 {
703     return call_user_func_array(
704         'PHPUnit_Framework_Assert::assertFalse',
705         func_get_args()
706     );
707 }
708
709 /**
710  * Asserts that the contents of one file is equal to the contents of another
711  * file.
712  *
713  * @param string $expected
714  * @param string $actual
715  * @param string $message
716  * @param bool   $canonicalize
717  * @param bool   $ignoreCase
718  *
719  * @since  Method available since Release 3.2.14
720  */
721 function assertFileEquals($expected, $actual, $message = '', $canonicalize = false, $ignoreCase = false)
722 {
723     return call_user_func_array(
724         'PHPUnit_Framework_Assert::assertFileEquals',
725         func_get_args()
726     );
727 }
728
729 /**
730  * Asserts that a file exists.
731  *
732  * @param string $filename
733  * @param string $message
734  *
735  * @since  Method available since Release 3.0.0
736  */
737 function assertFileExists($filename, $message = '')
738 {
739     return call_user_func_array(
740         'PHPUnit_Framework_Assert::assertFileExists',
741         func_get_args()
742     );
743 }
744
745 /**
746  * Asserts that the contents of one file is not equal to the contents of
747  * another file.
748  *
749  * @param string $expected
750  * @param string $actual
751  * @param string $message
752  * @param bool   $canonicalize
753  * @param bool   $ignoreCase
754  *
755  * @since  Method available since Release 3.2.14
756  */
757 function assertFileNotEquals($expected, $actual, $message = '', $canonicalize = false, $ignoreCase = false)
758 {
759     return call_user_func_array(
760         'PHPUnit_Framework_Assert::assertFileNotEquals',
761         func_get_args()
762     );
763 }
764
765 /**
766  * Asserts that a file does not exist.
767  *
768  * @param string $filename
769  * @param string $message
770  *
771  * @since  Method available since Release 3.0.0
772  */
773 function assertFileNotExists($filename, $message = '')
774 {
775     return call_user_func_array(
776         'PHPUnit_Framework_Assert::assertFileNotExists',
777         func_get_args()
778     );
779 }
780
781 /**
782  * Asserts that a value is greater than another value.
783  *
784  * @param mixed  $expected
785  * @param mixed  $actual
786  * @param string $message
787  *
788  * @since  Method available since Release 3.1.0
789  */
790 function assertGreaterThan($expected, $actual, $message = '')
791 {
792     return call_user_func_array(
793         'PHPUnit_Framework_Assert::assertGreaterThan',
794         func_get_args()
795     );
796 }
797
798 /**
799  * Asserts that a value is greater than or equal to another value.
800  *
801  * @param mixed  $expected
802  * @param mixed  $actual
803  * @param string $message
804  *
805  * @since  Method available since Release 3.1.0
806  */
807 function assertGreaterThanOrEqual($expected, $actual, $message = '')
808 {
809     return call_user_func_array(
810         'PHPUnit_Framework_Assert::assertGreaterThanOrEqual',
811         func_get_args()
812     );
813 }
814
815 /**
816  * Asserts that a variable is of a given type.
817  *
818  * @param string $expected
819  * @param mixed  $actual
820  * @param string $message
821  *
822  * @since Method available since Release 3.5.0
823  */
824 function assertInstanceOf($expected, $actual, $message = '')
825 {
826     return call_user_func_array(
827         'PHPUnit_Framework_Assert::assertInstanceOf',
828         func_get_args()
829     );
830 }
831
832 /**
833  * Asserts that a variable is of a given type.
834  *
835  * @param string $expected
836  * @param mixed  $actual
837  * @param string $message
838  *
839  * @since Method available since Release 3.5.0
840  */
841 function assertInternalType($expected, $actual, $message = '')
842 {
843     return call_user_func_array(
844         'PHPUnit_Framework_Assert::assertInternalType',
845         func_get_args()
846     );
847 }
848
849 /**
850  * Asserts that a string is a valid JSON string.
851  *
852  * @param string $actualJson
853  * @param string $message
854  *
855  * @since  Method available since Release 3.7.20
856  */
857 function assertJson($actualJson, $message = '')
858 {
859     return call_user_func_array(
860         'PHPUnit_Framework_Assert::assertJson',
861         func_get_args()
862     );
863 }
864
865 /**
866  * Asserts that two JSON files are equal.
867  *
868  * @param string $expectedFile
869  * @param string $actualFile
870  * @param string $message
871  */
872 function assertJsonFileEqualsJsonFile($expectedFile, $actualFile, $message = '')
873 {
874     return call_user_func_array(
875         'PHPUnit_Framework_Assert::assertJsonFileEqualsJsonFile',
876         func_get_args()
877     );
878 }
879
880 /**
881  * Asserts that two JSON files are not equal.
882  *
883  * @param string $expectedFile
884  * @param string $actualFile
885  * @param string $message
886  */
887 function assertJsonFileNotEqualsJsonFile($expectedFile, $actualFile, $message = '')
888 {
889     return call_user_func_array(
890         'PHPUnit_Framework_Assert::assertJsonFileNotEqualsJsonFile',
891         func_get_args()
892     );
893 }
894
895 /**
896  * Asserts that the generated JSON encoded object and the content of the given file are equal.
897  *
898  * @param string $expectedFile
899  * @param string $actualJson
900  * @param string $message
901  */
902 function assertJsonStringEqualsJsonFile($expectedFile, $actualJson, $message = '')
903 {
904     return call_user_func_array(
905         'PHPUnit_Framework_Assert::assertJsonStringEqualsJsonFile',
906         func_get_args()
907     );
908 }
909
910 /**
911  * Asserts that two given JSON encoded objects or arrays are equal.
912  *
913  * @param string $expectedJson
914  * @param string $actualJson
915  * @param string $message
916  */
917 function assertJsonStringEqualsJsonString($expectedJson, $actualJson, $message = '')
918 {
919     return call_user_func_array(
920         'PHPUnit_Framework_Assert::assertJsonStringEqualsJsonString',
921         func_get_args()
922     );
923 }
924
925 /**
926  * Asserts that the generated JSON encoded object and the content of the given file are not equal.
927  *
928  * @param string $expectedFile
929  * @param string $actualJson
930  * @param string $message
931  */
932 function assertJsonStringNotEqualsJsonFile($expectedFile, $actualJson, $message = '')
933 {
934     return call_user_func_array(
935         'PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonFile',
936         func_get_args()
937     );
938 }
939
940 /**
941  * Asserts that two given JSON encoded objects or arrays are not equal.
942  *
943  * @param string $expectedJson
944  * @param string $actualJson
945  * @param string $message
946  */
947 function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, $message = '')
948 {
949     return call_user_func_array(
950         'PHPUnit_Framework_Assert::assertJsonStringNotEqualsJsonString',
951         func_get_args()
952     );
953 }
954
955 /**
956  * Asserts that a value is smaller than another value.
957  *
958  * @param mixed  $expected
959  * @param mixed  $actual
960  * @param string $message
961  *
962  * @since  Method available since Release 3.1.0
963  */
964 function assertLessThan($expected, $actual, $message = '')
965 {
966     return call_user_func_array(
967         'PHPUnit_Framework_Assert::assertLessThan',
968         func_get_args()
969     );
970 }
971
972 /**
973  * Asserts that a value is smaller than or equal to another value.
974  *
975  * @param mixed  $expected
976  * @param mixed  $actual
977  * @param string $message
978  *
979  * @since  Method available since Release 3.1.0
980  */
981 function assertLessThanOrEqual($expected, $actual, $message = '')
982 {
983     return call_user_func_array(
984         'PHPUnit_Framework_Assert::assertLessThanOrEqual',
985         func_get_args()
986     );
987 }
988
989 /**
990  * Asserts that a haystack does not contain a needle.
991  *
992  * @param mixed  $needle
993  * @param mixed  $haystack
994  * @param string $message
995  * @param bool   $ignoreCase
996  * @param bool   $checkForObjectIdentity
997  * @param bool   $checkForNonObjectIdentity
998  *
999  * @since  Method available since Release 2.1.0
1000  */
1001 function assertNotContains($needle, $haystack, $message = '', $ignoreCase = false, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
1002 {
1003     return call_user_func_array(
1004         'PHPUnit_Framework_Assert::assertNotContains',
1005         func_get_args()
1006     );
1007 }
1008
1009 /**
1010  * Asserts that a haystack does not contain only values of a given type.
1011  *
1012  * @param string $type
1013  * @param mixed  $haystack
1014  * @param bool   $isNativeType
1015  * @param string $message
1016  *
1017  * @since  Method available since Release 3.1.4
1018  */
1019 function assertNotContainsOnly($type, $haystack, $isNativeType = null, $message = '')
1020 {
1021     return call_user_func_array(
1022         'PHPUnit_Framework_Assert::assertNotContainsOnly',
1023         func_get_args()
1024     );
1025 }
1026
1027 /**
1028  * Asserts the number of elements of an array, Countable or Traversable.
1029  *
1030  * @param int    $expectedCount
1031  * @param mixed  $haystack
1032  * @param string $message
1033  */
1034 function assertNotCount($expectedCount, $haystack, $message = '')
1035 {
1036     return call_user_func_array(
1037         'PHPUnit_Framework_Assert::assertNotCount',
1038         func_get_args()
1039     );
1040 }
1041
1042 /**
1043  * Asserts that a variable is not empty.
1044  *
1045  * @param mixed  $actual
1046  * @param string $message
1047  *
1048  * @throws PHPUnit_Framework_AssertionFailedError
1049  */
1050 function assertNotEmpty($actual, $message = '')
1051 {
1052     return call_user_func_array(
1053         'PHPUnit_Framework_Assert::assertNotEmpty',
1054         func_get_args()
1055     );
1056 }
1057
1058 /**
1059  * Asserts that two variables are not equal.
1060  *
1061  * @param mixed  $expected
1062  * @param mixed  $actual
1063  * @param string $message
1064  * @param float  $delta
1065  * @param int    $maxDepth
1066  * @param bool   $canonicalize
1067  * @param bool   $ignoreCase
1068  *
1069  * @since  Method available since Release 2.3.0
1070  */
1071 function assertNotEquals($expected, $actual, $message = '', $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
1072 {
1073     return call_user_func_array(
1074         'PHPUnit_Framework_Assert::assertNotEquals',
1075         func_get_args()
1076     );
1077 }
1078
1079 /**
1080  * Asserts that a variable is not of a given type.
1081  *
1082  * @param string $expected
1083  * @param mixed  $actual
1084  * @param string $message
1085  *
1086  * @since Method available since Release 3.5.0
1087  */
1088 function assertNotInstanceOf($expected, $actual, $message = '')
1089 {
1090     return call_user_func_array(
1091         'PHPUnit_Framework_Assert::assertNotInstanceOf',
1092         func_get_args()
1093     );
1094 }
1095
1096 /**
1097  * Asserts that a variable is not of a given type.
1098  *
1099  * @param string $expected
1100  * @param mixed  $actual
1101  * @param string $message
1102  *
1103  * @since Method available since Release 3.5.0
1104  */
1105 function assertNotInternalType($expected, $actual, $message = '')
1106 {
1107     return call_user_func_array(
1108         'PHPUnit_Framework_Assert::assertNotInternalType',
1109         func_get_args()
1110     );
1111 }
1112
1113 /**
1114  * Asserts that a condition is not false.
1115  *
1116  * @param bool   $condition
1117  * @param string $message
1118  *
1119  * @throws PHPUnit_Framework_AssertionFailedError
1120  */
1121 function assertNotFalse($condition, $message = '')
1122 {
1123     return call_user_func_array(
1124         'PHPUnit_Framework_Assert::assertNotFalse',
1125         func_get_args()
1126     );
1127 }
1128
1129 /**
1130  * Asserts that a variable is not null.
1131  *
1132  * @param mixed  $actual
1133  * @param string $message
1134  */
1135 function assertNotNull($actual, $message = '')
1136 {
1137     return call_user_func_array(
1138         'PHPUnit_Framework_Assert::assertNotNull',
1139         func_get_args()
1140     );
1141 }
1142
1143 /**
1144  * Asserts that a string does not match a given regular expression.
1145  *
1146  * @param string $pattern
1147  * @param string $string
1148  * @param string $message
1149  *
1150  * @since  Method available since Release 2.1.0
1151  */
1152 function assertNotRegExp($pattern, $string, $message = '')
1153 {
1154     return call_user_func_array(
1155         'PHPUnit_Framework_Assert::assertNotRegExp',
1156         func_get_args()
1157     );
1158 }
1159
1160 /**
1161  * Asserts that two variables do not have the same type and value.
1162  * Used on objects, it asserts that two variables do not reference
1163  * the same object.
1164  *
1165  * @param mixed  $expected
1166  * @param mixed  $actual
1167  * @param string $message
1168  */
1169 function assertNotSame($expected, $actual, $message = '')
1170 {
1171     return call_user_func_array(
1172         'PHPUnit_Framework_Assert::assertNotSame',
1173         func_get_args()
1174     );
1175 }
1176
1177 /**
1178  * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
1179  * is not the same.
1180  *
1181  * @param array|Countable|Traversable $expected
1182  * @param array|Countable|Traversable $actual
1183  * @param string                      $message
1184  */
1185 function assertNotSameSize($expected, $actual, $message = '')
1186 {
1187     return call_user_func_array(
1188         'PHPUnit_Framework_Assert::assertNotSameSize',
1189         func_get_args()
1190     );
1191 }
1192
1193 /**
1194  * This assertion is the exact opposite of assertTag().
1195  *
1196  * Rather than asserting that $matcher results in a match, it asserts that
1197  * $matcher does not match.
1198  *
1199  * @param array  $matcher
1200  * @param string $actual
1201  * @param string $message
1202  * @param bool   $isHtml
1203  *
1204  * @since  Method available since Release 3.3.0
1205  */
1206 function assertNotTag($matcher, $actual, $message = '', $isHtml = true)
1207 {
1208     return call_user_func_array(
1209         'PHPUnit_Framework_Assert::assertNotTag',
1210         func_get_args()
1211     );
1212 }
1213
1214 /**
1215  * Asserts that a variable is null.
1216  *
1217  * @param mixed  $actual
1218  * @param string $message
1219  */
1220 function assertNull($actual, $message = '')
1221 {
1222     return call_user_func_array(
1223         'PHPUnit_Framework_Assert::assertNull',
1224         func_get_args()
1225     );
1226 }
1227
1228 /**
1229  * Asserts that an object has a specified attribute.
1230  *
1231  * @param string $attributeName
1232  * @param object $object
1233  * @param string $message
1234  *
1235  * @since  Method available since Release 3.0.0
1236  */
1237 function assertObjectHasAttribute($attributeName, $object, $message = '')
1238 {
1239     return call_user_func_array(
1240         'PHPUnit_Framework_Assert::assertObjectHasAttribute',
1241         func_get_args()
1242     );
1243 }
1244
1245 /**
1246  * Asserts that an object does not have a specified attribute.
1247  *
1248  * @param string $attributeName
1249  * @param object $object
1250  * @param string $message
1251  *
1252  * @since  Method available since Release 3.0.0
1253  */
1254 function assertObjectNotHasAttribute($attributeName, $object, $message = '')
1255 {
1256     return call_user_func_array(
1257         'PHPUnit_Framework_Assert::assertObjectNotHasAttribute',
1258         func_get_args()
1259     );
1260 }
1261
1262 /**
1263  * Asserts that a string matches a given regular expression.
1264  *
1265  * @param string $pattern
1266  * @param string $string
1267  * @param string $message
1268  */
1269 function assertRegExp($pattern, $string, $message = '')
1270 {
1271     return call_user_func_array(
1272         'PHPUnit_Framework_Assert::assertRegExp',
1273         func_get_args()
1274     );
1275 }
1276
1277 /**
1278  * Asserts that two variables have the same type and value.
1279  * Used on objects, it asserts that two variables reference
1280  * the same object.
1281  *
1282  * @param mixed  $expected
1283  * @param mixed  $actual
1284  * @param string $message
1285  */
1286 function assertSame($expected, $actual, $message = '')
1287 {
1288     return call_user_func_array(
1289         'PHPUnit_Framework_Assert::assertSame',
1290         func_get_args()
1291     );
1292 }
1293
1294 /**
1295  * Assert that the size of two arrays (or `Countable` or `Traversable` objects)
1296  * is the same.
1297  *
1298  * @param array|Countable|Traversable $expected
1299  * @param array|Countable|Traversable $actual
1300  * @param string                      $message
1301  */
1302 function assertSameSize($expected, $actual, $message = '')
1303 {
1304     return call_user_func_array(
1305         'PHPUnit_Framework_Assert::assertSameSize',
1306         func_get_args()
1307     );
1308 }
1309
1310 /**
1311  * Assert the presence, absence, or count of elements in a document matching
1312  * the CSS $selector, regardless of the contents of those elements.
1313  *
1314  * The first argument, $selector, is the CSS selector used to match
1315  * the elements in the $actual document.
1316  *
1317  * The second argument, $count, can be either boolean or numeric.
1318  * When boolean, it asserts for presence of elements matching the selector
1319  * (true) or absence of elements (false).
1320  * When numeric, it asserts the count of elements.
1321  *
1322  * assertSelectCount("#binder", true, $xml);  // any?
1323  * assertSelectCount(".binder", 3, $xml); // exactly 3?
1324  *
1325  * @param array  $selector
1326  * @param int    $count
1327  * @param mixed  $actual
1328  * @param string $message
1329  * @param bool   $isHtml
1330  *
1331  * @since  Method available since Release 3.3.0
1332  */
1333 function assertSelectCount($selector, $count, $actual, $message = '', $isHtml = true)
1334 {
1335     return call_user_func_array(
1336         'PHPUnit_Framework_Assert::assertSelectCount',
1337         func_get_args()
1338     );
1339 }
1340
1341 /**
1342  * assertSelectEquals("#binder .name", "Chuck", true,  $xml);  // any?
1343  * assertSelectEquals("#binder .name", "Chuck", false, $xml);  // none?
1344  *
1345  * @param array  $selector
1346  * @param string $content
1347  * @param int    $count
1348  * @param mixed  $actual
1349  * @param string $message
1350  * @param bool   $isHtml
1351  *
1352  * @since  Method available since Release 3.3.0
1353  */
1354 function assertSelectEquals($selector, $content, $count, $actual, $message = '', $isHtml = true)
1355 {
1356     return call_user_func_array(
1357         'PHPUnit_Framework_Assert::assertSelectEquals',
1358         func_get_args()
1359     );
1360 }
1361
1362 /**
1363  * assertSelectRegExp("#binder .name", "/Mike|Derek/", true, $xml); // any?
1364  * assertSelectRegExp("#binder .name", "/Mike|Derek/", 3, $xml);// 3?
1365  *
1366  * @param array  $selector
1367  * @param string $pattern
1368  * @param int    $count
1369  * @param mixed  $actual
1370  * @param string $message
1371  * @param bool   $isHtml
1372  *
1373  * @since  Method available since Release 3.3.0
1374  */
1375 function assertSelectRegExp($selector, $pattern, $count, $actual, $message = '', $isHtml = true)
1376 {
1377     return call_user_func_array(
1378         'PHPUnit_Framework_Assert::assertSelectRegExp',
1379         func_get_args()
1380     );
1381 }
1382
1383 /**
1384  * Asserts that a string ends not with a given prefix.
1385  *
1386  * @param string $suffix
1387  * @param string $string
1388  * @param string $message
1389  *
1390  * @since  Method available since Release 3.4.0
1391  */
1392 function assertStringEndsNotWith($suffix, $string, $message = '')
1393 {
1394     return call_user_func_array(
1395         'PHPUnit_Framework_Assert::assertStringEndsNotWith',
1396         func_get_args()
1397     );
1398 }
1399
1400 /**
1401  * Asserts that a string ends with a given prefix.
1402  *
1403  * @param string $suffix
1404  * @param string $string
1405  * @param string $message
1406  *
1407  * @since  Method available since Release 3.4.0
1408  */
1409 function assertStringEndsWith($suffix, $string, $message = '')
1410 {
1411     return call_user_func_array(
1412         'PHPUnit_Framework_Assert::assertStringEndsWith',
1413         func_get_args()
1414     );
1415 }
1416
1417 /**
1418  * Asserts that the contents of a string is equal
1419  * to the contents of a file.
1420  *
1421  * @param string $expectedFile
1422  * @param string $actualString
1423  * @param string $message
1424  * @param bool   $canonicalize
1425  * @param bool   $ignoreCase
1426  *
1427  * @since  Method available since Release 3.3.0
1428  */
1429 function assertStringEqualsFile($expectedFile, $actualString, $message = '', $canonicalize = false, $ignoreCase = false)
1430 {
1431     return call_user_func_array(
1432         'PHPUnit_Framework_Assert::assertStringEqualsFile',
1433         func_get_args()
1434     );
1435 }
1436
1437 /**
1438  * Asserts that a string matches a given format string.
1439  *
1440  * @param string $format
1441  * @param string $string
1442  * @param string $message
1443  *
1444  * @since  Method available since Release 3.5.0
1445  */
1446 function assertStringMatchesFormat($format, $string, $message = '')
1447 {
1448     return call_user_func_array(
1449         'PHPUnit_Framework_Assert::assertStringMatchesFormat',
1450         func_get_args()
1451     );
1452 }
1453
1454 /**
1455  * Asserts that a string matches a given format file.
1456  *
1457  * @param string $formatFile
1458  * @param string $string
1459  * @param string $message
1460  *
1461  * @since  Method available since Release 3.5.0
1462  */
1463 function assertStringMatchesFormatFile($formatFile, $string, $message = '')
1464 {
1465     return call_user_func_array(
1466         'PHPUnit_Framework_Assert::assertStringMatchesFormatFile',
1467         func_get_args()
1468     );
1469 }
1470
1471 /**
1472  * Asserts that the contents of a string is not equal
1473  * to the contents of a file.
1474  *
1475  * @param string $expectedFile
1476  * @param string $actualString
1477  * @param string $message
1478  * @param bool   $canonicalize
1479  * @param bool   $ignoreCase
1480  *
1481  * @since  Method available since Release 3.3.0
1482  */
1483 function assertStringNotEqualsFile($expectedFile, $actualString, $message = '', $canonicalize = false, $ignoreCase = false)
1484 {
1485     return call_user_func_array(
1486         'PHPUnit_Framework_Assert::assertStringNotEqualsFile',
1487         func_get_args()
1488     );
1489 }
1490
1491 /**
1492  * Asserts that a string does not match a given format string.
1493  *
1494  * @param string $format
1495  * @param string $string
1496  * @param string $message
1497  *
1498  * @since  Method available since Release 3.5.0
1499  */
1500 function assertStringNotMatchesFormat($format, $string, $message = '')
1501 {
1502     return call_user_func_array(
1503         'PHPUnit_Framework_Assert::assertStringNotMatchesFormat',
1504         func_get_args()
1505     );
1506 }
1507
1508 /**
1509  * Asserts that a string does not match a given format string.
1510  *
1511  * @param string $formatFile
1512  * @param string $string
1513  * @param string $message
1514  *
1515  * @since  Method available since Release 3.5.0
1516  */
1517 function assertStringNotMatchesFormatFile($formatFile, $string, $message = '')
1518 {
1519     return call_user_func_array(
1520         'PHPUnit_Framework_Assert::assertStringNotMatchesFormatFile',
1521         func_get_args()
1522     );
1523 }
1524
1525 /**
1526  * Asserts that a string starts not with a given prefix.
1527  *
1528  * @param string $prefix
1529  * @param string $string
1530  * @param string $message
1531  *
1532  * @since  Method available since Release 3.4.0
1533  */
1534 function assertStringStartsNotWith($prefix, $string, $message = '')
1535 {
1536     return call_user_func_array(
1537         'PHPUnit_Framework_Assert::assertStringStartsNotWith',
1538         func_get_args()
1539     );
1540 }
1541
1542 /**
1543  * Asserts that a string starts with a given prefix.
1544  *
1545  * @param string $prefix
1546  * @param string $string
1547  * @param string $message
1548  *
1549  * @since  Method available since Release 3.4.0
1550  */
1551 function assertStringStartsWith($prefix, $string, $message = '')
1552 {
1553     return call_user_func_array(
1554         'PHPUnit_Framework_Assert::assertStringStartsWith',
1555         func_get_args()
1556     );
1557 }
1558
1559 /**
1560  * Evaluate an HTML or XML string and assert its structure and/or contents.
1561  *
1562  * The first argument ($matcher) is an associative array that specifies the
1563  * match criteria for the assertion:
1564  *
1565  *  - `id`   : the node with the given id attribute must match the
1566  * corresponding value.
1567  *  - `tag`  : the node type must match the corresponding value.
1568  *  - `attributes`   : a hash. The node's attributes must match the
1569  * corresponding values in the hash.
1570  *  - `content`  : The text content must match the given value.
1571  *  - `parent`   : a hash. The node's parent must match the
1572  * corresponding hash.
1573  *  - `child`: a hash. At least one of the node's immediate children
1574  * must meet the criteria described by the hash.
1575  *  - `ancestor` : a hash. At least one of the node's ancestors must
1576  * meet the criteria described by the hash.
1577  *  - `descendant`   : a hash. At least one of the node's descendants must
1578  * meet the criteria described by the hash.
1579  *  - `children` : a hash, for counting children of a node.
1580  * Accepts the keys:
1581  *- `count`: a number which must equal the number of children
1582  *   that match
1583  *- `less_than`: the number of matching children must be greater
1584  *   than this number
1585  *- `greater_than` : the number of matching children must be less than
1586  *   this number
1587  *- `only` : another hash consisting of the keys to use to match
1588  *   on the children, and only matching children will be
1589  *   counted
1590  *
1591  * <code>
1592  * // Matcher that asserts that there is an element with an id="my_id".
1593  * $matcher = array('id' => 'my_id');
1594  *
1595  * // Matcher that asserts that there is a "span" tag.
1596  * $matcher = array('tag' => 'span');
1597  *
1598  * // Matcher that asserts that there is a "span" tag with the content
1599  * // "Hello World".
1600  * $matcher = array('tag' => 'span', 'content' => 'Hello World');
1601  *
1602  * // Matcher that asserts that there is a "span" tag with content matching
1603  * // the regular expression pattern.
1604  * $matcher = array('tag' => 'span', 'content' => 'regexp:/Try P(HP|ython)/');
1605  *
1606  * // Matcher that asserts that there is a "span" with an "list" class
1607  * // attribute.
1608  * $matcher = array(
1609  *   'tag'=> 'span',
1610  *   'attributes' => array('class' => 'list')
1611  * );
1612  *
1613  * // Matcher that asserts that there is a "span" inside of a "div".
1614  * $matcher = array(
1615  *   'tag'=> 'span',
1616  *   'parent' => array('tag' => 'div')
1617  * );
1618  *
1619  * // Matcher that asserts that there is a "span" somewhere inside a
1620  * // "table".
1621  * $matcher = array(
1622  *   'tag'  => 'span',
1623  *   'ancestor' => array('tag' => 'table')
1624  * );
1625  *
1626  * // Matcher that asserts that there is a "span" with at least one "em"
1627  * // child.
1628  * $matcher = array(
1629  *   'tag'   => 'span',
1630  *   'child' => array('tag' => 'em')
1631  * );
1632  *
1633  * // Matcher that asserts that there is a "span" containing a (possibly
1634  * // nested) "strong" tag.
1635  * $matcher = array(
1636  *   'tag'=> 'span',
1637  *   'descendant' => array('tag' => 'strong')
1638  * );
1639  *
1640  * // Matcher that asserts that there is a "span" containing 5-10 "em" tags
1641  * // as immediate children.
1642  * $matcher = array(
1643  *   'tag'  => 'span',
1644  *   'children' => array(
1645  * 'less_than'=> 11,
1646  * 'greater_than' => 4,
1647  * 'only' => array('tag' => 'em')
1648  *   )
1649  * );
1650  *
1651  * // Matcher that asserts that there is a "div", with an "ul" ancestor and
1652  * // a "li" parent (with class="enum"), and containing a "span" descendant
1653  * // that contains an element with id="my_test" and the text "Hello World".
1654  * $matcher = array(
1655  *   'tag'=> 'div',
1656  *   'ancestor'   => array('tag' => 'ul'),
1657  *   'parent' => array(
1658  * 'tag'=> 'li',
1659  * 'attributes' => array('class' => 'enum')
1660  *   ),
1661  *   'descendant' => array(
1662  * 'tag'   => 'span',
1663  * 'child' => array(
1664  *   'id'  => 'my_test',
1665  *   'content' => 'Hello World'
1666  * )
1667  *   )
1668  * );
1669  *
1670  * // Use assertTag() to apply a $matcher to a piece of $html.
1671  * $this->assertTag($matcher, $html);
1672  *
1673  * // Use assertTag() to apply a $matcher to a piece of $xml.
1674  * $this->assertTag($matcher, $xml, '', false);
1675  * </code>
1676  *
1677  * The second argument ($actual) is a string containing either HTML or
1678  * XML text to be tested.
1679  *
1680  * The third argument ($message) is an optional message that will be
1681  * used if the assertion fails.
1682  *
1683  * The fourth argument ($html) is an optional flag specifying whether
1684  * to load the $actual string into a DOMDocument using the HTML or
1685  * XML load strategy.  It is true by default, which assumes the HTML
1686  * load strategy.  In many cases, this will be acceptable for XML as well.
1687  *
1688  * @param array  $matcher
1689  * @param string $actual
1690  * @param string $message
1691  * @param bool   $isHtml
1692  *
1693  * @since  Method available since Release 3.3.0
1694  */
1695 function assertTag($matcher, $actual, $message = '', $isHtml = true)
1696 {
1697     return call_user_func_array(
1698         'PHPUnit_Framework_Assert::assertTag',
1699         func_get_args()
1700     );
1701 }
1702
1703 /**
1704  * Evaluates a PHPUnit_Framework_Constraint matcher object.
1705  *
1706  * @param  mixed $value
1707  * @param PHPUnit_Framework_Constraint $constraint
1708  * @param string                       $message
1709  *
1710  * @since  Method available since Release 3.0.0
1711  */
1712 function assertThat($value, PHPUnit_Framework_Constraint $constraint, $message = '')
1713 {
1714     return call_user_func_array(
1715         'PHPUnit_Framework_Assert::assertThat',
1716         func_get_args()
1717     );
1718 }
1719
1720 /**
1721  * Asserts that a condition is true.
1722  *
1723  * @param bool   $condition
1724  * @param string $message
1725  *
1726  * @throws PHPUnit_Framework_AssertionFailedError
1727  */
1728 function assertTrue($condition, $message = '')
1729 {
1730     return call_user_func_array(
1731         'PHPUnit_Framework_Assert::assertTrue',
1732         func_get_args()
1733     );
1734 }
1735
1736 /**
1737  * Asserts that two XML files are equal.
1738  *
1739  * @param string $expectedFile
1740  * @param string $actualFile
1741  * @param string $message
1742  *
1743  * @since  Method available since Release 3.1.0
1744  */
1745 function assertXmlFileEqualsXmlFile($expectedFile, $actualFile, $message = '')
1746 {
1747     return call_user_func_array(
1748         'PHPUnit_Framework_Assert::assertXmlFileEqualsXmlFile',
1749         func_get_args()
1750     );
1751 }
1752
1753 /**
1754  * Asserts that two XML files are not equal.
1755  *
1756  * @param string $expectedFile
1757  * @param string $actualFile
1758  * @param string $message
1759  *
1760  * @since  Method available since Release 3.1.0
1761  */
1762 function assertXmlFileNotEqualsXmlFile($expectedFile, $actualFile, $message = '')
1763 {
1764     return call_user_func_array(
1765         'PHPUnit_Framework_Assert::assertXmlFileNotEqualsXmlFile',
1766         func_get_args()
1767     );
1768 }
1769
1770 /**
1771  * Asserts that two XML documents are equal.
1772  *
1773  * @param string $expectedFile
1774  * @param string $actualXml
1775  * @param string $message
1776  *
1777  * @since  Method available since Release 3.3.0
1778  */
1779 function assertXmlStringEqualsXmlFile($expectedFile, $actualXml, $message = '')
1780 {
1781     return call_user_func_array(
1782         'PHPUnit_Framework_Assert::assertXmlStringEqualsXmlFile',
1783         func_get_args()
1784     );
1785 }
1786
1787 /**
1788  * Asserts that two XML documents are equal.
1789  *
1790  * @param string $expectedXml
1791  * @param string $actualXml
1792  * @param string $message
1793  *
1794  * @since  Method available since Release 3.1.0
1795  */
1796 function assertXmlStringEqualsXmlString($expectedXml, $actualXml, $message = '')
1797 {
1798     return call_user_func_array(
1799         'PHPUnit_Framework_Assert::assertXmlStringEqualsXmlString',
1800         func_get_args()
1801     );
1802 }
1803
1804 /**
1805  * Asserts that two XML documents are not equal.
1806  *
1807  * @param string $expectedFile
1808  * @param string $actualXml
1809  * @param string $message
1810  *
1811  * @since  Method available since Release 3.3.0
1812  */
1813 function assertXmlStringNotEqualsXmlFile($expectedFile, $actualXml, $message = '')
1814 {
1815     return call_user_func_array(
1816         'PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlFile',
1817         func_get_args()
1818     );
1819 }
1820
1821 /**
1822  * Asserts that two XML documents are not equal.
1823  *
1824  * @param string $expectedXml
1825  * @param string $actualXml
1826  * @param string $message
1827  *
1828  * @since  Method available since Release 3.1.0
1829  */
1830 function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, $message = '')
1831 {
1832     return call_user_func_array(
1833         'PHPUnit_Framework_Assert::assertXmlStringNotEqualsXmlString',
1834         func_get_args()
1835     );
1836 }
1837
1838 /**
1839  * Returns a matcher that matches when the method is executed
1840  * at the given $index.
1841  *
1842  * @param int $index
1843  *
1844  * @return PHPUnit_Framework_MockObject_Matcher_InvokedAtIndex
1845  *
1846  * @since  Method available since Release 3.0.0
1847  */
1848 function at($index)
1849 {
1850     return call_user_func_array(
1851         'PHPUnit_Framework_TestCase::at',
1852         func_get_args()
1853     );
1854 }
1855
1856 /**
1857  * Returns a matcher that matches when the method is executed at least once.
1858  *
1859  * @return PHPUnit_Framework_MockObject_Matcher_InvokedAtLeastOnce
1860  *
1861  * @since  Method available since Release 3.0.0
1862  */
1863 function atLeastOnce()
1864 {
1865     return call_user_func_array(
1866         'PHPUnit_Framework_TestCase::atLeastOnce',
1867         func_get_args()
1868     );
1869 }
1870
1871 /**
1872  * Returns a PHPUnit_Framework_Constraint_Attribute matcher object.
1873  *
1874  * @param PHPUnit_Framework_Constraint $constraint
1875  * @param string                       $attributeName
1876  *
1877  * @return PHPUnit_Framework_Constraint_Attribute
1878  *
1879  * @since  Method available since Release 3.1.0
1880  */
1881 function attribute(PHPUnit_Framework_Constraint $constraint, $attributeName)
1882 {
1883     return call_user_func_array(
1884         'PHPUnit_Framework_Assert::attribute',
1885         func_get_args()
1886     );
1887 }
1888
1889 /**
1890  * Returns a PHPUnit_Framework_Constraint_IsEqual matcher object
1891  * that is wrapped in a PHPUnit_Framework_Constraint_Attribute matcher
1892  * object.
1893  *
1894  * @param string $attributeName
1895  * @param mixed  $value
1896  * @param float  $delta
1897  * @param int    $maxDepth
1898  * @param bool   $canonicalize
1899  * @param bool   $ignoreCase
1900  *
1901  * @return PHPUnit_Framework_Constraint_Attribute
1902  *
1903  * @since  Method available since Release 3.1.0
1904  */
1905 function attributeEqualTo($attributeName, $value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
1906 {
1907     return call_user_func_array(
1908         'PHPUnit_Framework_Assert::attributeEqualTo',
1909         func_get_args()
1910     );
1911 }
1912
1913 /**
1914  * Returns a PHPUnit_Framework_Constraint_Callback matcher object.
1915  *
1916  * @param callable $callback
1917  *
1918  * @return PHPUnit_Framework_Constraint_Callback
1919  */
1920 function callback($callback)
1921 {
1922     return call_user_func_array(
1923         'PHPUnit_Framework_Assert::callback',
1924         func_get_args()
1925     );
1926 }
1927
1928 /**
1929  * Returns a PHPUnit_Framework_Constraint_ClassHasAttribute matcher object.
1930  *
1931  * @param string $attributeName
1932  *
1933  * @return PHPUnit_Framework_Constraint_ClassHasAttribute
1934  *
1935  * @since  Method available since Release 3.1.0
1936  */
1937 function classHasAttribute($attributeName)
1938 {
1939     return call_user_func_array(
1940         'PHPUnit_Framework_Assert::classHasAttribute',
1941         func_get_args()
1942     );
1943 }
1944
1945 /**
1946  * Returns a PHPUnit_Framework_Constraint_ClassHasStaticAttribute matcher
1947  * object.
1948  *
1949  * @param string $attributeName
1950  *
1951  * @return PHPUnit_Framework_Constraint_ClassHasStaticAttribute
1952  *
1953  * @since  Method available since Release 3.1.0
1954  */
1955 function classHasStaticAttribute($attributeName)
1956 {
1957     return call_user_func_array(
1958         'PHPUnit_Framework_Assert::classHasStaticAttribute',
1959         func_get_args()
1960     );
1961 }
1962
1963 /**
1964  * Returns a PHPUnit_Framework_Constraint_TraversableContains matcher
1965  * object.
1966  *
1967  * @param mixed $value
1968  * @param bool  $checkForObjectIdentity
1969  * @param bool  $checkForNonObjectIdentity
1970  *
1971  * @return PHPUnit_Framework_Constraint_TraversableContains
1972  *
1973  * @since  Method available since Release 3.0.0
1974  */
1975 function contains($value, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false)
1976 {
1977     return call_user_func_array(
1978         'PHPUnit_Framework_Assert::contains',
1979         func_get_args()
1980     );
1981 }
1982
1983 /**
1984  * Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher
1985  * object.
1986  *
1987  * @param string $type
1988  *
1989  * @return PHPUnit_Framework_Constraint_TraversableContainsOnly
1990  *
1991  * @since  Method available since Release 3.1.4
1992  */
1993 function containsOnly($type)
1994 {
1995     return call_user_func_array(
1996         'PHPUnit_Framework_Assert::containsOnly',
1997         func_get_args()
1998     );
1999 }
2000
2001 /**
2002  * Returns a PHPUnit_Framework_Constraint_TraversableContainsOnly matcher
2003  * object.
2004  *
2005  * @param string $classname
2006  *
2007  * @return PHPUnit_Framework_Constraint_TraversableContainsOnly
2008  */
2009 function containsOnlyInstancesOf($classname)
2010 {
2011     return call_user_func_array(
2012         'PHPUnit_Framework_Assert::containsOnlyInstancesOf',
2013         func_get_args()
2014     );
2015 }
2016
2017 /**
2018  * Returns a PHPUnit_Framework_Constraint_IsEqual matcher object.
2019  *
2020  * @param mixed $value
2021  * @param float $delta
2022  * @param int   $maxDepth
2023  * @param bool  $canonicalize
2024  * @param bool  $ignoreCase
2025  *
2026  * @return PHPUnit_Framework_Constraint_IsEqual
2027  *
2028  * @since  Method available since Release 3.0.0
2029  */
2030 function equalTo($value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false)
2031 {
2032     return call_user_func_array(
2033         'PHPUnit_Framework_Assert::equalTo',
2034         func_get_args()
2035     );
2036 }
2037
2038 /**
2039  * Returns a matcher that matches when the method is executed
2040  * exactly $count times.
2041  *
2042  * @param int $count
2043  *
2044  * @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
2045  *
2046  * @since  Method available since Release 3.0.0
2047  */
2048 function exactly($count)
2049 {
2050     return call_user_func_array(
2051         'PHPUnit_Framework_TestCase::exactly',
2052         func_get_args()
2053     );
2054 }
2055
2056 /**
2057  * Returns a PHPUnit_Framework_Constraint_FileExists matcher object.
2058  *
2059  * @return PHPUnit_Framework_Constraint_FileExists
2060  *
2061  * @since  Method available since Release 3.0.0
2062  */
2063 function fileExists()
2064 {
2065     return call_user_func_array(
2066         'PHPUnit_Framework_Assert::fileExists',
2067         func_get_args()
2068     );
2069 }
2070
2071 /**
2072  * Returns a PHPUnit_Framework_Constraint_GreaterThan matcher object.
2073  *
2074  * @param mixed $value
2075  *
2076  * @return PHPUnit_Framework_Constraint_GreaterThan
2077  *
2078  * @since  Method available since Release 3.0.0
2079  */
2080 function greaterThan($value)
2081 {
2082     return call_user_func_array(
2083         'PHPUnit_Framework_Assert::greaterThan',
2084         func_get_args()
2085     );
2086 }
2087
2088 /**
2089  * Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps
2090  * a PHPUnit_Framework_Constraint_IsEqual and a
2091  * PHPUnit_Framework_Constraint_GreaterThan matcher object.
2092  *
2093  * @param mixed $value
2094  *
2095  * @return PHPUnit_Framework_Constraint_Or
2096  *
2097  * @since  Method available since Release 3.1.0
2098  */
2099 function greaterThanOrEqual($value)
2100 {
2101     return call_user_func_array(
2102         'PHPUnit_Framework_Assert::greaterThanOrEqual',
2103         func_get_args()
2104     );
2105 }
2106
2107 /**
2108  * Returns a PHPUnit_Framework_Constraint_IsIdentical matcher object.
2109  *
2110  * @param mixed $value
2111  *
2112  * @return PHPUnit_Framework_Constraint_IsIdentical
2113  *
2114  * @since  Method available since Release 3.0.0
2115  */
2116 function identicalTo($value)
2117 {
2118     return call_user_func_array(
2119         'PHPUnit_Framework_Assert::identicalTo',
2120         func_get_args()
2121     );
2122 }
2123
2124 /**
2125  * Returns a PHPUnit_Framework_Constraint_IsEmpty matcher object.
2126  *
2127  * @return PHPUnit_Framework_Constraint_IsEmpty
2128  *
2129  * @since  Method available since Release 3.5.0
2130  */
2131 function isEmpty()
2132 {
2133     return call_user_func_array(
2134         'PHPUnit_Framework_Assert::isEmpty',
2135         func_get_args()
2136     );
2137 }
2138
2139 /**
2140  * Returns a PHPUnit_Framework_Constraint_IsFalse matcher object.
2141  *
2142  * @return PHPUnit_Framework_Constraint_IsFalse
2143  *
2144  * @since  Method available since Release 3.3.0
2145  */
2146 function isFalse()
2147 {
2148     return call_user_func_array(
2149         'PHPUnit_Framework_Assert::isFalse',
2150         func_get_args()
2151     );
2152 }
2153
2154 /**
2155  * Returns a PHPUnit_Framework_Constraint_IsInstanceOf matcher object.
2156  *
2157  * @param string $className
2158  *
2159  * @return PHPUnit_Framework_Constraint_IsInstanceOf
2160  *
2161  * @since  Method available since Release 3.0.0
2162  */
2163 function isInstanceOf($className)
2164 {
2165     return call_user_func_array(
2166         'PHPUnit_Framework_Assert::isInstanceOf',
2167         func_get_args()
2168     );
2169 }
2170
2171 /**
2172  * Returns a PHPUnit_Framework_Constraint_IsJson matcher object.
2173  *
2174  * @return PHPUnit_Framework_Constraint_IsJson
2175  *
2176  * @since  Method available since Release 3.7.20
2177  */
2178 function isJson()
2179 {
2180     return call_user_func_array(
2181         'PHPUnit_Framework_Assert::isJson',
2182         func_get_args()
2183     );
2184 }
2185
2186 /**
2187  * Returns a PHPUnit_Framework_Constraint_IsNull matcher object.
2188  *
2189  * @return PHPUnit_Framework_Constraint_IsNull
2190  *
2191  * @since  Method available since Release 3.3.0
2192  */
2193 function isNull()
2194 {
2195     return call_user_func_array(
2196         'PHPUnit_Framework_Assert::isNull',
2197         func_get_args()
2198     );
2199 }
2200
2201 /**
2202  * Returns a PHPUnit_Framework_Constraint_IsTrue matcher object.
2203  *
2204  * @return PHPUnit_Framework_Constraint_IsTrue
2205  *
2206  * @since  Method available since Release 3.3.0
2207  */
2208 function isTrue()
2209 {
2210     return call_user_func_array(
2211         'PHPUnit_Framework_Assert::isTrue',
2212         func_get_args()
2213     );
2214 }
2215
2216 /**
2217  * Returns a PHPUnit_Framework_Constraint_IsType matcher object.
2218  *
2219  * @param string $type
2220  *
2221  * @return PHPUnit_Framework_Constraint_IsType
2222  *
2223  * @since  Method available since Release 3.0.0
2224  */
2225 function isType($type)
2226 {
2227     return call_user_func_array(
2228         'PHPUnit_Framework_Assert::isType',
2229         func_get_args()
2230     );
2231 }
2232
2233 /**
2234  * Returns a PHPUnit_Framework_Constraint_LessThan matcher object.
2235  *
2236  * @param mixed $value
2237  *
2238  * @return PHPUnit_Framework_Constraint_LessThan
2239  *
2240  * @since  Method available since Release 3.0.0
2241  */
2242 function lessThan($value)
2243 {
2244     return call_user_func_array(
2245         'PHPUnit_Framework_Assert::lessThan',
2246         func_get_args()
2247     );
2248 }
2249
2250 /**
2251  * Returns a PHPUnit_Framework_Constraint_Or matcher object that wraps
2252  * a PHPUnit_Framework_Constraint_IsEqual and a
2253  * PHPUnit_Framework_Constraint_LessThan matcher object.
2254  *
2255  * @param mixed $value
2256  *
2257  * @return PHPUnit_Framework_Constraint_Or
2258  *
2259  * @since  Method available since Release 3.1.0
2260  */
2261 function lessThanOrEqual($value)
2262 {
2263     return call_user_func_array(
2264         'PHPUnit_Framework_Assert::lessThanOrEqual',
2265         func_get_args()
2266     );
2267 }
2268
2269 /**
2270  * Returns a PHPUnit_Framework_Constraint_And matcher object.
2271  *
2272  * @return PHPUnit_Framework_Constraint_And
2273  *
2274  * @since  Method available since Release 3.0.0
2275  */
2276 function logicalAnd()
2277 {
2278     return call_user_func_array(
2279         'PHPUnit_Framework_Assert::logicalAnd',
2280         func_get_args()
2281     );
2282 }
2283
2284 /**
2285  * Returns a PHPUnit_Framework_Constraint_Not matcher object.
2286  *
2287  * @param PHPUnit_Framework_Constraint $constraint
2288  *
2289  * @return PHPUnit_Framework_Constraint_Not
2290  *
2291  * @since  Method available since Release 3.0.0
2292  */
2293 function logicalNot(PHPUnit_Framework_Constraint $constraint)
2294 {
2295     return call_user_func_array(
2296         'PHPUnit_Framework_Assert::logicalNot',
2297         func_get_args()
2298     );
2299 }
2300
2301 /**
2302  * Returns a PHPUnit_Framework_Constraint_Or matcher object.
2303  *
2304  * @return PHPUnit_Framework_Constraint_Or
2305  *
2306  * @since  Method available since Release 3.0.0
2307  */
2308 function logicalOr()
2309 {
2310     return call_user_func_array(
2311         'PHPUnit_Framework_Assert::logicalOr',
2312         func_get_args()
2313     );
2314 }
2315
2316 /**
2317  * Returns a PHPUnit_Framework_Constraint_Xor matcher object.
2318  *
2319  * @return PHPUnit_Framework_Constraint_Xor
2320  *
2321  * @since  Method available since Release 3.0.0
2322  */
2323 function logicalXor()
2324 {
2325     return call_user_func_array(
2326         'PHPUnit_Framework_Assert::logicalXor',
2327         func_get_args()
2328     );
2329 }
2330
2331 /**
2332  * Returns a PHPUnit_Framework_Constraint_StringMatches matcher object.
2333  *
2334  * @param string $string
2335  *
2336  * @return PHPUnit_Framework_Constraint_StringMatches
2337  *
2338  * @since  Method available since Release 3.5.0
2339  */
2340 function matches($string)
2341 {
2342     return call_user_func_array(
2343         'PHPUnit_Framework_Assert::matches',
2344         func_get_args()
2345     );
2346 }
2347
2348 /**
2349  * Returns a PHPUnit_Framework_Constraint_PCREMatch matcher object.
2350  *
2351  * @param string $pattern
2352  *
2353  * @return PHPUnit_Framework_Constraint_PCREMatch
2354  *
2355  * @since  Method available since Release 3.0.0
2356  */
2357 function matchesRegularExpression($pattern)
2358 {
2359     return call_user_func_array(
2360         'PHPUnit_Framework_Assert::matchesRegularExpression',
2361         func_get_args()
2362     );
2363 }
2364
2365 /**
2366  * Returns a matcher that matches when the method is never executed.
2367  *
2368  * @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
2369  *
2370  * @since  Method available since Release 3.0.0
2371  */
2372 function never()
2373 {
2374     return call_user_func_array(
2375         'PHPUnit_Framework_TestCase::never',
2376         func_get_args()
2377     );
2378 }
2379
2380 /**
2381  * Returns a PHPUnit_Framework_Constraint_ObjectHasAttribute matcher object.
2382  *
2383  * @param string $attributeName
2384  *
2385  * @return PHPUnit_Framework_Constraint_ObjectHasAttribute
2386  *
2387  * @since  Method available since Release 3.0.0
2388  */
2389 function objectHasAttribute($attributeName)
2390 {
2391     return call_user_func_array(
2392         'PHPUnit_Framework_Assert::objectHasAttribute',
2393         func_get_args()
2394     );
2395 }
2396
2397 /**
2398  * @param mixed $value, ...
2399  *
2400  * @return PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls
2401  *
2402  * @since  Method available since Release 3.0.0
2403  */
2404 function onConsecutiveCalls()
2405 {
2406     return call_user_func_array(
2407         'PHPUnit_Framework_TestCase::onConsecutiveCalls',
2408         func_get_args()
2409     );
2410 }
2411
2412 /**
2413  * Returns a matcher that matches when the method is executed exactly once.
2414  *
2415  * @return PHPUnit_Framework_MockObject_Matcher_InvokedCount
2416  *
2417  * @since  Method available since Release 3.0.0
2418  */
2419 function once()
2420 {
2421     return call_user_func_array(
2422         'PHPUnit_Framework_TestCase::once',
2423         func_get_args()
2424     );
2425 }
2426
2427 /**
2428  * @param int $argumentIndex
2429  *
2430  * @return PHPUnit_Framework_MockObject_Stub_ReturnArgument
2431  *
2432  * @since  Method available since Release 3.3.0
2433  */
2434 function returnArgument($argumentIndex)
2435 {
2436     return call_user_func_array(
2437         'PHPUnit_Framework_TestCase::returnArgument',
2438         func_get_args()
2439     );
2440 }
2441
2442 /**
2443  * @param mixed $callback
2444  *
2445  * @return PHPUnit_Framework_MockObject_Stub_ReturnCallback
2446  *
2447  * @since  Method available since Release 3.3.0
2448  */
2449 function returnCallback($callback)
2450 {
2451     return call_user_func_array(
2452         'PHPUnit_Framework_TestCase::returnCallback',
2453         func_get_args()
2454     );
2455 }
2456
2457 /**
2458  * Returns the current object.
2459  *
2460  * This method is useful when mocking a fluent interface.
2461  *
2462  * @return PHPUnit_Framework_MockObject_Stub_ReturnSelf
2463  *
2464  * @since  Method available since Release 3.6.0
2465  */
2466 function returnSelf()
2467 {
2468     return call_user_func_array(
2469         'PHPUnit_Framework_TestCase::returnSelf',
2470         func_get_args()
2471     );
2472 }
2473
2474 /**
2475  * @param mixed $value
2476  *
2477  * @return PHPUnit_Framework_MockObject_Stub_Return
2478  *
2479  * @since  Method available since Release 3.0.0
2480  */
2481 function returnValue($value)
2482 {
2483     return call_user_func_array(
2484         'PHPUnit_Framework_TestCase::returnValue',
2485         func_get_args()
2486     );
2487 }
2488
2489 /**
2490  * @param array $valueMap
2491  *
2492  * @return PHPUnit_Framework_MockObject_Stub_ReturnValueMap
2493  *
2494  * @since  Method available since Release 3.6.0
2495  */
2496 function returnValueMap(array $valueMap)
2497 {
2498     return call_user_func_array(
2499         'PHPUnit_Framework_TestCase::returnValueMap',
2500         func_get_args()
2501     );
2502 }
2503
2504 /**
2505  * Returns a PHPUnit_Framework_Constraint_StringContains matcher object.
2506  *
2507  * @param string $string
2508  * @param bool   $case
2509  *
2510  * @return PHPUnit_Framework_Constraint_StringContains
2511  *
2512  * @since  Method available since Release 3.0.0
2513  */
2514 function stringContains($string, $case = true)
2515 {
2516     return call_user_func_array(
2517         'PHPUnit_Framework_Assert::stringContains',
2518         func_get_args()
2519     );
2520 }
2521
2522 /**
2523  * Returns a PHPUnit_Framework_Constraint_StringEndsWith matcher object.
2524  *
2525  * @param mixed $suffix
2526  *
2527  * @return PHPUnit_Framework_Constraint_StringEndsWith
2528  *
2529  * @since  Method available since Release 3.4.0
2530  */
2531 function stringEndsWith($suffix)
2532 {
2533     return call_user_func_array(
2534         'PHPUnit_Framework_Assert::stringEndsWith',
2535         func_get_args()
2536     );
2537 }
2538
2539 /**
2540  * Returns a PHPUnit_Framework_Constraint_StringStartsWith matcher object.
2541  *
2542  * @param mixed $prefix
2543  *
2544  * @return PHPUnit_Framework_Constraint_StringStartsWith
2545  *
2546  * @since  Method available since Release 3.4.0
2547  */
2548 function stringStartsWith($prefix)
2549 {
2550     return call_user_func_array(
2551         'PHPUnit_Framework_Assert::stringStartsWith',
2552         func_get_args()
2553     );
2554 }
2555
2556 /**
2557  * @param Exception $exception
2558  *
2559  * @return PHPUnit_Framework_MockObject_Stub_Exception
2560  *
2561  * @since  Method available since Release 3.1.0
2562  */
2563 function throwException(Exception $exception)
2564 {
2565     return call_user_func_array(
2566         'PHPUnit_Framework_TestCase::throwException',
2567         func_get_args()
2568     );
2569 }