1 | <?php |
||
10 | class Example |
||
11 | { |
||
12 | /** |
||
13 | * @var string Name of this example |
||
14 | */ |
||
15 | private $name; |
||
16 | |||
17 | /** |
||
18 | * @var CodeBlock Example code |
||
19 | */ |
||
20 | private $code; |
||
21 | |||
22 | /** |
||
23 | * @var ExpectationInterface[] List of expectations |
||
24 | */ |
||
25 | private $expectations; |
||
26 | |||
27 | /** |
||
28 | * @param string $name |
||
29 | */ |
||
30 | public function __construct($name, CodeBlock $code, array $expectations) |
||
36 | |||
37 | /** |
||
38 | * Get name of example |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | public function getName() |
||
46 | |||
47 | /** |
||
48 | * Get example code block |
||
49 | * |
||
50 | * @return CodeBlock |
||
51 | */ |
||
52 | public function getCodeBlock() |
||
53 | { |
||
54 | return $this->code; |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * Get registered expectations |
||
59 | * |
||
60 | * @return ExpectationInterface[] |
||
61 | */ |
||
62 | public function getExpectations() |
||
66 | } |
||
67 |