1 | <?php |
||
24 | class ProcedureValidatorTest extends \PHPUnit_Framework_TestCase |
||
25 | { |
||
26 | |||
27 | /** +++++++++++++++++++++++++++++++++++ **/ |
||
28 | /** ++++++++++++++ TESTS ++++++++++++++ **/ |
||
29 | /** +++++++++++++++++++++++++++++++++++ **/ |
||
30 | |||
31 | /** |
||
32 | * Test syntax exception is |
||
33 | * thrown if procedure contains |
||
34 | * syntax error. |
||
35 | * |
||
36 | * @access public |
||
37 | * @return void |
||
38 | */ |
||
39 | public function testProcedureSyntaxExceptionIsThrownIfProcedureContainsSyntaxError() |
||
49 | |||
50 | /** |
||
51 | * Test syntax exception contains errors. |
||
52 | * |
||
53 | * @access public |
||
54 | * @return void |
||
55 | */ |
||
56 | public function testSyntaxExceptionContainsErrors() |
||
70 | |||
71 | /** |
||
72 | * Test requirement exception is thrown |
||
73 | * if procedure does not contain phantom |
||
74 | * exit statement. |
||
75 | * |
||
76 | * @access public |
||
77 | * @return void |
||
78 | */ |
||
79 | public function testRequirementExceptionIsThrownIfProcedureDoesNotContainPhanomtExitStatement() |
||
89 | |||
90 | /** |
||
91 | * Test true is returned if procedure is valid |
||
92 | * |
||
93 | * @access public |
||
94 | * @return void |
||
95 | */ |
||
96 | public function testTrueIsReturnedIfProcedureIsValid() |
||
105 | |||
106 | /** |
||
107 | * Test procedure is valid if procedure |
||
108 | * has comments. |
||
109 | * |
||
110 | * @access public |
||
111 | * @return void |
||
112 | */ |
||
113 | public function testProcedureIsValidIfProcedureHasComments() |
||
122 | |||
123 | /** +++++++++++++++++++++++++++++++++++ **/ |
||
124 | /** ++++++++++ TEST ENTITIES ++++++++++ **/ |
||
125 | /** +++++++++++++++++++++++++++++++++++ **/ |
||
126 | |||
127 | /** |
||
128 | * Get procedure validator. |
||
129 | * |
||
130 | * @access protected |
||
131 | * @param \JonnyW\PhantomJs\Procedure\ProcedureLoaderInterface $procedureLoader |
||
132 | * @param \JonnyW\PhantomJs\Validator\EngineInterface $engine |
||
133 | * @return \JonnyW\PhantomJs\Procedure\ProcedureValidator |
||
134 | */ |
||
135 | protected function getValidator(ProcedureLoaderInterface $procedureLoader, EngineInterface $engine) |
||
141 | |||
142 | /** |
||
143 | * Get procedure loader. |
||
144 | * |
||
145 | * @access protected |
||
146 | * @return \JonnyW\PhantomJs\Procedure\ProcedureLoader |
||
147 | */ |
||
148 | protected function getProcedureLoader() |
||
152 | |||
153 | /** |
||
154 | * Get esprima. |
||
155 | * |
||
156 | * @access protected |
||
157 | * @return \JonnyW\PhantomJs\Validator\Esprima |
||
158 | */ |
||
159 | protected function getEsprima() |
||
169 | } |
||
170 |