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