1: <?php
2:
3: /**
4: * This file is part of expect package.
5: *
6: * (c) Noritaka Horio <holy.shared.design@gmail.com>
7: *
8: * This source file is subject to the MIT license that is bundled
9: * with this source code in the file LICENSE.
10: */
11: namespace expect\matcher;
12:
13: /**
14: * Alias of ToEuqal.
15: *
16: * <code>
17: * $matcher = new ToBe(100);
18: * $matcher->match(100); //return true
19: *
20: * $matcher = new ToBe(100);
21: * $matcher->match(99); //return false
22: * <code>
23: *
24: * @author Noritaka Horio <holy.shared.design@gmail.com>
25: * @copyright Noritaka Horio <holy.shared.design@gmail.com>
26: *
27: * @see expect\matcher\ToEqual
28: */
29: final class ToBe implements ReportableMatcher
30: {
31: use EqualMatcherDelegatable;
32:
33: /**
34: * Create a new matcher.
35: *
36: * @param mixed $expected expected value
37: */
38: public function __construct($expected)
39: {
40: $this->equalMatcher = new ToEqual($expected);
41: }
42: }
43: