1 | <?php |
||
15 | abstract class ParserHookTest extends \PHPUnit_Framework_TestCase { |
||
16 | |||
17 | public static function setUpBeforeClass() { |
||
22 | |||
23 | /** |
||
24 | * @since 2.0 |
||
25 | * @return \ParserHook |
||
26 | */ |
||
27 | protected abstract function getInstance(); |
||
28 | |||
29 | /** |
||
30 | * @since 2.0 |
||
31 | * @return array |
||
32 | */ |
||
33 | public abstract function parametersProvider(); |
||
34 | |||
35 | /** |
||
36 | * Triggers the render process with different sets of parameters to see if |
||
37 | * no errors or notices are thrown and the result indeed is a string. |
||
38 | * |
||
39 | * @dataProvider parametersProvider |
||
40 | * @since 2.0 |
||
41 | * @param array $parameters |
||
42 | * @param string|null $expected |
||
43 | */ |
||
44 | public function testRender( array $parameters, $expected = null ) { |
||
69 | |||
70 | public function processingProvider() { |
||
73 | |||
74 | /** |
||
75 | * @dataProvider processingProvider |
||
76 | * @since 3.0 |
||
77 | */ |
||
78 | public function testParamProcessing( array $parameters, array $expectedValues ) { |
||
106 | |||
107 | /** |
||
108 | * Returns an array with the default values of the parameters. |
||
109 | * |
||
110 | * @since 3.0 |
||
111 | * |
||
112 | * @return array |
||
113 | */ |
||
114 | protected function getDefaultValues() { |
||
127 | |||
128 | protected function arrayWrap( array $elements ) { |
||
136 | |||
137 | } |