Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
/*
4
 Copyright (c) 2009-2010 hamcrest.org
5
 */
6
 
7
// This file is generated from the static method @factory doctags.
8
 
9
if (!function_exists('assertThat')) {
10
    /**
11
     * Make an assertion and throw {@link Hamcrest_AssertionError} if it fails.
12
     *
13
     * Example:
14
     * <pre>
15
     * //With an identifier
16
     * assertThat("assertion identifier", $apple->flavour(), equalTo("tasty"));
17
     * //Without an identifier
18
     * assertThat($apple->flavour(), equalTo("tasty"));
19
     * //Evaluating a boolean expression
20
     * assertThat("some error", $a > $b);
21
     * </pre>
22
     */
23
    function assertThat()
24
    {
25
        $args = func_get_args();
26
        call_user_func_array(
27
            array('Hamcrest\MatcherAssert', 'assertThat'),
28
            $args
29
        );
30
    }
31
}
32
 
33
if (!function_exists('anArray')) {
34
    /**
35
     * Evaluates to true only if each $matcher[$i] is satisfied by $array[$i].
36
     */
37
    function anArray(/* args... */)
38
    {
39
        $args = func_get_args();
40
        return call_user_func_array(array('\Hamcrest\Arrays\IsArray', 'anArray'), $args);
41
    }
42
}
43
 
44
if (!function_exists('hasItemInArray')) {
45
    /**
46
     * Evaluates to true if any item in an array satisfies the given matcher.
47
     *
48
     * @param mixed $item as a {@link Hamcrest\Matcher} or a value.
49
     *
50
     * @return \Hamcrest\Arrays\IsArrayContaining
51
     */
52
    function hasItemInArray($item)
53
    {
54
        return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item);
55
    }
56
}
57
 
58
if (!function_exists('hasValue')) {
59
    /**
60
     * Evaluates to true if any item in an array satisfies the given matcher.
61
     *
62
     * @param mixed $item as a {@link Hamcrest\Matcher} or a value.
63
     *
64
     * @return \Hamcrest\Arrays\IsArrayContaining
65
     */
66
    function hasValue($item)
67
    {
68
        return \Hamcrest\Arrays\IsArrayContaining::hasItemInArray($item);
69
    }
70
}
71
 
72
if (!function_exists('arrayContainingInAnyOrder')) {
73
    /**
74
     * An array with elements that match the given matchers.
75
     */
76
    function arrayContainingInAnyOrder(/* args... */)
77
    {
78
        $args = func_get_args();
79
        return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args);
80
    }
81
}
82
 
83
if (!function_exists('containsInAnyOrder')) {
84
    /**
85
     * An array with elements that match the given matchers.
86
     */
87
    function containsInAnyOrder(/* args... */)
88
    {
89
        $args = func_get_args();
90
        return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInAnyOrder', 'arrayContainingInAnyOrder'), $args);
91
    }
92
}
93
 
94
if (!function_exists('arrayContaining')) {
95
    /**
96
     * An array with elements that match the given matchers in the same order.
97
     */
98
    function arrayContaining(/* args... */)
99
    {
100
        $args = func_get_args();
101
        return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args);
102
    }
103
}
104
 
105
if (!function_exists('contains')) {
106
    /**
107
     * An array with elements that match the given matchers in the same order.
108
     */
109
    function contains(/* args... */)
110
    {
111
        $args = func_get_args();
112
        return call_user_func_array(array('\Hamcrest\Arrays\IsArrayContainingInOrder', 'arrayContaining'), $args);
113
    }
114
}
115
 
116
if (!function_exists('hasKeyInArray')) {
117
    /**
118
     * Evaluates to true if any key in an array matches the given matcher.
119
     *
120
     * @param mixed $key as a {@link Hamcrest\Matcher} or a value.
121
     *
122
     * @return \Hamcrest\Arrays\IsArrayContainingKey
123
     */
124
    function hasKeyInArray($key)
125
    {
126
        return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key);
127
    }
128
}
129
 
130
if (!function_exists('hasKey')) {
131
    /**
132
     * Evaluates to true if any key in an array matches the given matcher.
133
     *
134
     * @param mixed $key as a {@link Hamcrest\Matcher} or a value.
135
     *
136
     * @return \Hamcrest\Arrays\IsArrayContainingKey
137
     */
138
    function hasKey($key)
139
    {
140
        return \Hamcrest\Arrays\IsArrayContainingKey::hasKeyInArray($key);
141
    }
142
}
143
 
144
if (!function_exists('hasKeyValuePair')) {
145
    /**
146
     * Test if an array has both an key and value in parity with each other.
147
     */
148
    function hasKeyValuePair($key, $value)
149
    {
150
        return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value);
151
    }
152
}
153
 
154
if (!function_exists('hasEntry')) {
155
    /**
156
     * Test if an array has both an key and value in parity with each other.
157
     */
158
    function hasEntry($key, $value)
159
    {
160
        return \Hamcrest\Arrays\IsArrayContainingKeyValuePair::hasKeyValuePair($key, $value);
161
    }
162
}
163
 
164
if (!function_exists('arrayWithSize')) {
165
    /**
166
     * Does array size satisfy a given matcher?
167
     *
168
     * @param \Hamcrest\Matcher|int $size as a {@link Hamcrest\Matcher} or a value.
169
     *
170
     * @return \Hamcrest\Arrays\IsArrayWithSize
171
     */
172
    function arrayWithSize($size)
173
    {
174
        return \Hamcrest\Arrays\IsArrayWithSize::arrayWithSize($size);
175
    }
176
}
177
 
178
if (!function_exists('emptyArray')) {
179
    /**
180
     * Matches an empty array.
181
     */
182
    function emptyArray()
183
    {
184
        return \Hamcrest\Arrays\IsArrayWithSize::emptyArray();
185
    }
186
}
187
 
188
if (!function_exists('nonEmptyArray')) {
189
    /**
190
     * Matches an empty array.
191
     */
192
    function nonEmptyArray()
193
    {
194
        return \Hamcrest\Arrays\IsArrayWithSize::nonEmptyArray();
195
    }
196
}
197
 
198
if (!function_exists('emptyTraversable')) {
199
    /**
200
     * Returns true if traversable is empty.
201
     */
202
    function emptyTraversable()
203
    {
204
        return \Hamcrest\Collection\IsEmptyTraversable::emptyTraversable();
205
    }
206
}
207
 
208
if (!function_exists('nonEmptyTraversable')) {
209
    /**
210
     * Returns true if traversable is not empty.
211
     */
212
    function nonEmptyTraversable()
213
    {
214
        return \Hamcrest\Collection\IsEmptyTraversable::nonEmptyTraversable();
215
    }
216
}
217
 
218
if (!function_exists('traversableWithSize')) {
219
    /**
220
     * Does traversable size satisfy a given matcher?
221
     */
222
    function traversableWithSize($size)
223
    {
224
        return \Hamcrest\Collection\IsTraversableWithSize::traversableWithSize($size);
225
    }
226
}
227
 
228
if (!function_exists('allOf')) {
229
    /**
230
     * Evaluates to true only if ALL of the passed in matchers evaluate to true.
231
     */
232
    function allOf(/* args... */)
233
    {
234
        $args = func_get_args();
235
        return call_user_func_array(array('\Hamcrest\Core\AllOf', 'allOf'), $args);
236
    }
237
}
238
 
239
if (!function_exists('anyOf')) {
240
    /**
241
     * Evaluates to true if ANY of the passed in matchers evaluate to true.
242
     */
243
    function anyOf(/* args... */)
244
    {
245
        $args = func_get_args();
246
        return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'anyOf'), $args);
247
    }
248
}
249
 
250
if (!function_exists('noneOf')) {
251
    /**
252
     * Evaluates to false if ANY of the passed in matchers evaluate to true.
253
     */
254
    function noneOf(/* args... */)
255
    {
256
        $args = func_get_args();
257
        return call_user_func_array(array('\Hamcrest\Core\AnyOf', 'noneOf'), $args);
258
    }
259
}
260
 
261
if (!function_exists('both')) {
262
    /**
263
     * This is useful for fluently combining matchers that must both pass.
264
     * For example:
265
     * <pre>
266
     *   assertThat($string, both(containsString("a"))->andAlso(containsString("b")));
267
     * </pre>
268
     */
269
    function both(\Hamcrest\Matcher $matcher)
270
    {
271
        return \Hamcrest\Core\CombinableMatcher::both($matcher);
272
    }
273
}
274
 
275
if (!function_exists('either')) {
276
    /**
277
     * This is useful for fluently combining matchers where either may pass,
278
     * for example:
279
     * <pre>
280
     *   assertThat($string, either(containsString("a"))->orElse(containsString("b")));
281
     * </pre>
282
     */
283
    function either(\Hamcrest\Matcher $matcher)
284
    {
285
        return \Hamcrest\Core\CombinableMatcher::either($matcher);
286
    }
287
}
288
 
289
if (!function_exists('describedAs')) {
290
    /**
291
     * Wraps an existing matcher and overrides the description when it fails.
292
     */
293
    function describedAs(/* args... */)
294
    {
295
        $args = func_get_args();
296
        return call_user_func_array(array('\Hamcrest\Core\DescribedAs', 'describedAs'), $args);
297
    }
298
}
299
 
300
if (!function_exists('everyItem')) {
301
    /**
302
     * @param Matcher $itemMatcher
303
     *   A matcher to apply to every element in an array.
304
     *
305
     * @return \Hamcrest\Core\Every
306
     *   Evaluates to TRUE for a collection in which every item matches $itemMatcher
307
     */
308
    function everyItem(\Hamcrest\Matcher $itemMatcher)
309
    {
310
        return \Hamcrest\Core\Every::everyItem($itemMatcher);
311
    }
312
}
313
 
314
if (!function_exists('hasToString')) {
315
    /**
316
     * Does array size satisfy a given matcher?
317
     */
318
    function hasToString($matcher)
319
    {
320
        return \Hamcrest\Core\HasToString::hasToString($matcher);
321
    }
322
}
323
 
324
if (!function_exists('is')) {
325
    /**
326
     * Decorates another Matcher, retaining the behavior but allowing tests
327
     * to be slightly more expressive.
328
     *
329
     * For example:  assertThat($cheese, equalTo($smelly))
330
     *          vs.  assertThat($cheese, is(equalTo($smelly)))
331
     */
332
    function is($value)
333
    {
334
        return \Hamcrest\Core\Is::is($value);
335
    }
336
}
337
 
338
if (!function_exists('anything')) {
339
    /**
340
     * This matcher always evaluates to true.
341
     *
342
     * @param string $description A meaningful string used when describing itself.
343
     *
344
     * @return \Hamcrest\Core\IsAnything
345
     */
346
    function anything($description = 'ANYTHING')
347
    {
348
        return \Hamcrest\Core\IsAnything::anything($description);
349
    }
350
}
351
 
352
if (!function_exists('hasItem')) {
353
    /**
354
     * Test if the value is an array containing this matcher.
355
     *
356
     * Example:
357
     * <pre>
358
     * assertThat(array('a', 'b'), hasItem(equalTo('b')));
359
     * //Convenience defaults to equalTo()
360
     * assertThat(array('a', 'b'), hasItem('b'));
361
     * </pre>
362
     */
363
    function hasItem(/* args... */)
364
    {
365
        $args = func_get_args();
366
        return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItem'), $args);
367
    }
368
}
369
 
370
if (!function_exists('hasItems')) {
371
    /**
372
     * Test if the value is an array containing elements that match all of these
373
     * matchers.
374
     *
375
     * Example:
376
     * <pre>
377
     * assertThat(array('a', 'b', 'c'), hasItems(equalTo('a'), equalTo('b')));
378
     * </pre>
379
     */
380
    function hasItems(/* args... */)
381
    {
382
        $args = func_get_args();
383
        return call_user_func_array(array('\Hamcrest\Core\IsCollectionContaining', 'hasItems'), $args);
384
    }
385
}
386
 
387
if (!function_exists('equalTo')) {
388
    /**
389
     * Is the value equal to another value, as tested by the use of the "=="
390
     * comparison operator?
391
     */
392
    function equalTo($item)
393
    {
394
        return \Hamcrest\Core\IsEqual::equalTo($item);
395
    }
396
}
397
 
398
if (!function_exists('identicalTo')) {
399
    /**
400
     * Tests of the value is identical to $value as tested by the "===" operator.
401
     */
402
    function identicalTo($value)
403
    {
404
        return \Hamcrest\Core\IsIdentical::identicalTo($value);
405
    }
406
}
407
 
408
if (!function_exists('anInstanceOf')) {
409
    /**
410
     * Is the value an instance of a particular type?
411
     * This version assumes no relationship between the required type and
412
     * the signature of the method that sets it up, for example in
413
     * <code>assertThat($anObject, anInstanceOf('Thing'));</code>
414
     */
415
    function anInstanceOf($theClass)
416
    {
417
        return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass);
418
    }
419
}
420
 
421
if (!function_exists('any')) {
422
    /**
423
     * Is the value an instance of a particular type?
424
     * This version assumes no relationship between the required type and
425
     * the signature of the method that sets it up, for example in
426
     * <code>assertThat($anObject, anInstanceOf('Thing'));</code>
427
     */
428
    function any($theClass)
429
    {
430
        return \Hamcrest\Core\IsInstanceOf::anInstanceOf($theClass);
431
    }
432
}
433
 
434
if (!function_exists('not')) {
435
    /**
436
     * Matches if value does not match $value.
437
     */
438
    function not($value)
439
    {
440
        return \Hamcrest\Core\IsNot::not($value);
441
    }
442
}
443
 
444
if (!function_exists('nullValue')) {
445
    /**
446
     * Matches if value is null.
447
     */
448
    function nullValue()
449
    {
450
        return \Hamcrest\Core\IsNull::nullValue();
451
    }
452
}
453
 
454
if (!function_exists('notNullValue')) {
455
    /**
456
     * Matches if value is not null.
457
     */
458
    function notNullValue()
459
    {
460
        return \Hamcrest\Core\IsNull::notNullValue();
461
    }
462
}
463
 
464
if (!function_exists('sameInstance')) {
465
    /**
466
     * Creates a new instance of IsSame.
467
     *
468
     * @param mixed $object
469
     *   The predicate evaluates to true only when the argument is
470
     *   this object.
471
     *
472
     * @return \Hamcrest\Core\IsSame
473
     */
474
    function sameInstance($object)
475
    {
476
        return \Hamcrest\Core\IsSame::sameInstance($object);
477
    }
478
}
479
 
480
if (!function_exists('typeOf')) {
481
    /**
482
     * Is the value a particular built-in type?
483
     */
484
    function typeOf($theType)
485
    {
486
        return \Hamcrest\Core\IsTypeOf::typeOf($theType);
487
    }
488
}
489
 
490
if (!function_exists('set')) {
491
    /**
492
     * Matches if value (class, object, or array) has named $property.
493
     */
494
    function set($property)
495
    {
496
        return \Hamcrest\Core\Set::set($property);
497
    }
498
}
499
 
500
if (!function_exists('notSet')) {
501
    /**
502
     * Matches if value (class, object, or array) does not have named $property.
503
     */
504
    function notSet($property)
505
    {
506
        return \Hamcrest\Core\Set::notSet($property);
507
    }
508
}
509
 
510
if (!function_exists('closeTo')) {
511
    /**
512
     * Matches if value is a number equal to $value within some range of
513
     * acceptable error $delta.
514
     */
515
    function closeTo($value, $delta)
516
    {
517
        return \Hamcrest\Number\IsCloseTo::closeTo($value, $delta);
518
    }
519
}
520
 
521
if (!function_exists('comparesEqualTo')) {
522
    /**
523
     * The value is not > $value, nor < $value.
524
     */
525
    function comparesEqualTo($value)
526
    {
527
        return \Hamcrest\Number\OrderingComparison::comparesEqualTo($value);
528
    }
529
}
530
 
531
if (!function_exists('greaterThan')) {
532
    /**
533
     * The value is > $value.
534
     */
535
    function greaterThan($value)
536
    {
537
        return \Hamcrest\Number\OrderingComparison::greaterThan($value);
538
    }
539
}
540
 
541
if (!function_exists('greaterThanOrEqualTo')) {
542
    /**
543
     * The value is >= $value.
544
     */
545
    function greaterThanOrEqualTo($value)
546
    {
547
        return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value);
548
    }
549
}
550
 
551
if (!function_exists('atLeast')) {
552
    /**
553
     * The value is >= $value.
554
     */
555
    function atLeast($value)
556
    {
557
        return \Hamcrest\Number\OrderingComparison::greaterThanOrEqualTo($value);
558
    }
559
}
560
 
561
if (!function_exists('lessThan')) {
562
    /**
563
     * The value is < $value.
564
     */
565
    function lessThan($value)
566
    {
567
        return \Hamcrest\Number\OrderingComparison::lessThan($value);
568
    }
569
}
570
 
571
if (!function_exists('lessThanOrEqualTo')) {
572
    /**
573
     * The value is <= $value.
574
     */
575
    function lessThanOrEqualTo($value)
576
    {
577
        return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value);
578
    }
579
}
580
 
581
if (!function_exists('atMost')) {
582
    /**
583
     * The value is <= $value.
584
     */
585
    function atMost($value)
586
    {
587
        return \Hamcrest\Number\OrderingComparison::lessThanOrEqualTo($value);
588
    }
589
}
590
 
591
if (!function_exists('isEmptyString')) {
592
    /**
593
     * Matches if value is a zero-length string.
594
     */
595
    function isEmptyString()
596
    {
597
        return \Hamcrest\Text\IsEmptyString::isEmptyString();
598
    }
599
}
600
 
601
if (!function_exists('emptyString')) {
602
    /**
603
     * Matches if value is a zero-length string.
604
     */
605
    function emptyString()
606
    {
607
        return \Hamcrest\Text\IsEmptyString::isEmptyString();
608
    }
609
}
610
 
611
if (!function_exists('isEmptyOrNullString')) {
612
    /**
613
     * Matches if value is null or a zero-length string.
614
     */
615
    function isEmptyOrNullString()
616
    {
617
        return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString();
618
    }
619
}
620
 
621
if (!function_exists('nullOrEmptyString')) {
622
    /**
623
     * Matches if value is null or a zero-length string.
624
     */
625
    function nullOrEmptyString()
626
    {
627
        return \Hamcrest\Text\IsEmptyString::isEmptyOrNullString();
628
    }
629
}
630
 
631
if (!function_exists('isNonEmptyString')) {
632
    /**
633
     * Matches if value is a non-zero-length string.
634
     */
635
    function isNonEmptyString()
636
    {
637
        return \Hamcrest\Text\IsEmptyString::isNonEmptyString();
638
    }
639
}
640
 
641
if (!function_exists('nonEmptyString')) {
642
    /**
643
     * Matches if value is a non-zero-length string.
644
     */
645
    function nonEmptyString()
646
    {
647
        return \Hamcrest\Text\IsEmptyString::isNonEmptyString();
648
    }
649
}
650
 
651
if (!function_exists('equalToIgnoringCase')) {
652
    /**
653
     * Matches if value is a string equal to $string, regardless of the case.
654
     */
655
    function equalToIgnoringCase($string)
656
    {
657
        return \Hamcrest\Text\IsEqualIgnoringCase::equalToIgnoringCase($string);
658
    }
659
}
660
 
661
if (!function_exists('equalToIgnoringWhiteSpace')) {
662
    /**
663
     * Matches if value is a string equal to $string, regardless of whitespace.
664
     */
665
    function equalToIgnoringWhiteSpace($string)
666
    {
667
        return \Hamcrest\Text\IsEqualIgnoringWhiteSpace::equalToIgnoringWhiteSpace($string);
668
    }
669
}
670
 
671
if (!function_exists('matchesPattern')) {
672
    /**
673
     * Matches if value is a string that matches regular expression $pattern.
674
     */
675
    function matchesPattern($pattern)
676
    {
677
        return \Hamcrest\Text\MatchesPattern::matchesPattern($pattern);
678
    }
679
}
680
 
681
if (!function_exists('containsString')) {
682
    /**
683
     * Matches if value is a string that contains $substring.
684
     */
685
    function containsString($substring)
686
    {
687
        return \Hamcrest\Text\StringContains::containsString($substring);
688
    }
689
}
690
 
691
if (!function_exists('containsStringIgnoringCase')) {
692
    /**
693
     * Matches if value is a string that contains $substring regardless of the case.
694
     */
695
    function containsStringIgnoringCase($substring)
696
    {
697
        return \Hamcrest\Text\StringContainsIgnoringCase::containsStringIgnoringCase($substring);
698
    }
699
}
700
 
701
if (!function_exists('stringContainsInOrder')) {
702
    /**
703
     * Matches if value contains $substrings in a constrained order.
704
     */
705
    function stringContainsInOrder(/* args... */)
706
    {
707
        $args = func_get_args();
708
        return call_user_func_array(array('\Hamcrest\Text\StringContainsInOrder', 'stringContainsInOrder'), $args);
709
    }
710
}
711
 
712
if (!function_exists('endsWith')) {
713
    /**
714
     * Matches if value is a string that ends with $substring.
715
     */
716
    function endsWith($substring)
717
    {
718
        return \Hamcrest\Text\StringEndsWith::endsWith($substring);
719
    }
720
}
721
 
722
if (!function_exists('startsWith')) {
723
    /**
724
     * Matches if value is a string that starts with $substring.
725
     */
726
    function startsWith($substring)
727
    {
728
        return \Hamcrest\Text\StringStartsWith::startsWith($substring);
729
    }
730
}
731
 
732
if (!function_exists('arrayValue')) {
733
    /**
734
     * Is the value an array?
735
     */
736
    function arrayValue()
737
    {
738
        return \Hamcrest\Type\IsArray::arrayValue();
739
    }
740
}
741
 
742
if (!function_exists('booleanValue')) {
743
    /**
744
     * Is the value a boolean?
745
     */
746
    function booleanValue()
747
    {
748
        return \Hamcrest\Type\IsBoolean::booleanValue();
749
    }
750
}
751
 
752
if (!function_exists('boolValue')) {
753
    /**
754
     * Is the value a boolean?
755
     */
756
    function boolValue()
757
    {
758
        return \Hamcrest\Type\IsBoolean::booleanValue();
759
    }
760
}
761
 
762
if (!function_exists('callableValue')) {
763
    /**
764
     * Is the value callable?
765
     */
766
    function callableValue()
767
    {
768
        return \Hamcrest\Type\IsCallable::callableValue();
769
    }
770
}
771
 
772
if (!function_exists('doubleValue')) {
773
    /**
774
     * Is the value a float/double?
775
     */
776
    function doubleValue()
777
    {
778
        return \Hamcrest\Type\IsDouble::doubleValue();
779
    }
780
}
781
 
782
if (!function_exists('floatValue')) {
783
    /**
784
     * Is the value a float/double?
785
     */
786
    function floatValue()
787
    {
788
        return \Hamcrest\Type\IsDouble::doubleValue();
789
    }
790
}
791
 
792
if (!function_exists('integerValue')) {
793
    /**
794
     * Is the value an integer?
795
     */
796
    function integerValue()
797
    {
798
        return \Hamcrest\Type\IsInteger::integerValue();
799
    }
800
}
801
 
802
if (!function_exists('intValue')) {
803
    /**
804
     * Is the value an integer?
805
     */
806
    function intValue()
807
    {
808
        return \Hamcrest\Type\IsInteger::integerValue();
809
    }
810
}
811
 
812
if (!function_exists('numericValue')) {
813
    /**
814
     * Is the value a numeric?
815
     */
816
    function numericValue()
817
    {
818
        return \Hamcrest\Type\IsNumeric::numericValue();
819
    }
820
}
821
 
822
if (!function_exists('objectValue')) {
823
    /**
824
     * Is the value an object?
825
     */
826
    function objectValue()
827
    {
828
        return \Hamcrest\Type\IsObject::objectValue();
829
    }
830
}
831
 
832
if (!function_exists('anObject')) {
833
    /**
834
     * Is the value an object?
835
     */
836
    function anObject()
837
    {
838
        return \Hamcrest\Type\IsObject::objectValue();
839
    }
840
}
841
 
842
if (!function_exists('resourceValue')) {
843
    /**
844
     * Is the value a resource?
845
     */
846
    function resourceValue()
847
    {
848
        return \Hamcrest\Type\IsResource::resourceValue();
849
    }
850
}
851
 
852
if (!function_exists('scalarValue')) {
853
    /**
854
     * Is the value a scalar (boolean, integer, double, or string)?
855
     */
856
    function scalarValue()
857
    {
858
        return \Hamcrest\Type\IsScalar::scalarValue();
859
    }
860
}
861
 
862
if (!function_exists('stringValue')) {
863
    /**
864
     * Is the value a string?
865
     */
866
    function stringValue()
867
    {
868
        return \Hamcrest\Type\IsString::stringValue();
869
    }
870
}
871
 
872
if (!function_exists('hasXPath')) {
873
    /**
874
     * Wraps <code>$matcher</code> with {@link Hamcrest\Core\IsEqual)
875
     * if it's not a matcher and the XPath in <code>count()</code>
876
     * if it's an integer.
877
     */
878
    function hasXPath($xpath, $matcher = null)
879
    {
880
        return \Hamcrest\Xml\HasXPath::hasXPath($xpath, $matcher);
881
    }
882
}