@@ -34,10 +34,10 @@ |
||
| 34 | 34 | protected $user; |
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | - * Define the extensions to be tested |
|
| 38 | - * |
|
| 39 | - * @return array vendor/name of extension(s) to test |
|
| 40 | - */ |
|
| 37 | + * Define the extensions to be tested |
|
| 38 | + * |
|
| 39 | + * @return array vendor/name of extension(s) to test |
|
| 40 | + */ |
|
| 41 | 41 | static protected function setup_extensions() |
| 42 | 42 | { |
| 43 | 43 | return array('ernadoo/phpbbdirectory'); |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | - * Setup test environment |
|
| 26 | - */ |
|
| 25 | + * Setup test environment |
|
| 26 | + */ |
|
| 27 | 27 | public function setUp() |
| 28 | 28 | { |
| 29 | 29 | parent::setUp(); |
@@ -61,10 +61,10 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
| 64 | - * Test data for the test_display_base() function |
|
| 65 | - * |
|
| 66 | - * @return array Array of test data |
|
| 67 | - */ |
|
| 64 | + * Test data for the test_display_base() function |
|
| 65 | + * |
|
| 66 | + * @return array Array of test data |
|
| 67 | + */ |
|
| 68 | 68 | public function display_base_data() |
| 69 | 69 | { |
| 70 | 70 | return array( |
@@ -73,10 +73,10 @@ discard block |
||
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | /** |
| 76 | - * Test controller display |
|
| 77 | - * |
|
| 78 | - * @dataProvider display_base_data |
|
| 79 | - */ |
|
| 76 | + * Test controller display |
|
| 77 | + * |
|
| 78 | + * @dataProvider display_base_data |
|
| 79 | + */ |
|
| 80 | 80 | public function test_display_base($status_code, $page_content) |
| 81 | 81 | { |
| 82 | 82 | $controller = $this->get_controller(); |
@@ -87,9 +87,9 @@ discard block |
||
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** |
| 90 | - * Test base case scenario |
|
| 91 | - * |
|
| 92 | - */ |
|
| 90 | + * Test base case scenario |
|
| 91 | + * |
|
| 92 | + */ |
|
| 93 | 93 | public function test_for_root_categories() |
| 94 | 94 | { |
| 95 | 95 | $this->template->expects($this->exactly(2)) |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /** |
| 25 | - * Setup test environment |
|
| 26 | - */ |
|
| 25 | + * Setup test environment |
|
| 26 | + */ |
|
| 27 | 27 | public function setUp() |
| 28 | 28 | { |
| 29 | 29 | parent::setUp(); |
@@ -65,10 +65,10 @@ discard block |
||
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | - * Test data for the test_display_cat_by_id() function |
|
| 69 | - * |
|
| 70 | - * @return array Array of test data |
|
| 71 | - */ |
|
| 68 | + * Test data for the test_display_cat_by_id() function |
|
| 69 | + * |
|
| 70 | + * @return array Array of test data |
|
| 71 | + */ |
|
| 72 | 72 | public function display_cat_by_id_data() |
| 73 | 73 | { |
| 74 | 74 | return array( |
@@ -77,10 +77,10 @@ discard block |
||
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | - * Test controller display |
|
| 81 | - * |
|
| 82 | - * @dataProvider display_cat_by_id_data |
|
| 83 | - */ |
|
| 80 | + * Test controller display |
|
| 81 | + * |
|
| 82 | + * @dataProvider display_cat_by_id_data |
|
| 83 | + */ |
|
| 84 | 84 | public function test_display_cat_by_id($cat_id, $page, $status_code) |
| 85 | 85 | { |
| 86 | 86 | $controller = $this->get_controller(); |
@@ -121,10 +121,10 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
| 124 | - * Test data for the test_display_cat_fails() function |
|
| 125 | - * |
|
| 126 | - * @return array Array of test data |
|
| 127 | - */ |
|
| 124 | + * Test data for the test_display_cat_fails() function |
|
| 125 | + * |
|
| 126 | + * @return array Array of test data |
|
| 127 | + */ |
|
| 128 | 128 | public function display_cat_fails_data() |
| 129 | 129 | { |
| 130 | 130 | return array( |
@@ -133,10 +133,10 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | |
| 135 | 135 | /** |
| 136 | - * Test controller display throws 404 exceptions |
|
| 137 | - * |
|
| 138 | - * @dataProvider display_cat_fails_data |
|
| 139 | - */ |
|
| 136 | + * Test controller display throws 404 exceptions |
|
| 137 | + * |
|
| 138 | + * @dataProvider display_cat_fails_data |
|
| 139 | + */ |
|
| 140 | 140 | public function test_display_cat_fails($cat_id, $page, $status_code, $page_content) |
| 141 | 141 | { |
| 142 | 142 | $controller = $this->get_controller(); |
@@ -153,10 +153,10 @@ discard block |
||
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | /** |
| 156 | - * Test data for the test_category_one_page() function |
|
| 157 | - * |
|
| 158 | - * @return array Array of test data |
|
| 159 | - */ |
|
| 156 | + * Test data for the test_category_one_page() function |
|
| 157 | + * |
|
| 158 | + * @return array Array of test data |
|
| 159 | + */ |
|
| 160 | 160 | public function category_one_page_data() |
| 161 | 161 | { |
| 162 | 162 | return array( |
@@ -165,10 +165,10 @@ discard block |
||
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | /** |
| 168 | - * Test base case scenario |
|
| 169 | - * |
|
| 170 | - * @dataProvider category_one_page_data |
|
| 171 | - */ |
|
| 168 | + * Test base case scenario |
|
| 169 | + * |
|
| 170 | + * @dataProvider category_one_page_data |
|
| 171 | + */ |
|
| 172 | 172 | function test_category_one_page($cat_id, $cat_name, $parent_cat_id, $nb_links) |
| 173 | 173 | { |
| 174 | 174 | $controller = $this->get_controller(); |
@@ -178,10 +178,10 @@ discard block |
||
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
| 181 | - * Test data for the test_category_no_links() function |
|
| 182 | - * |
|
| 183 | - * @return array Array of test data |
|
| 184 | - */ |
|
| 181 | + * Test data for the test_category_no_links() function |
|
| 182 | + * |
|
| 183 | + * @return array Array of test data |
|
| 184 | + */ |
|
| 185 | 185 | public function category_no_links_data() |
| 186 | 186 | { |
| 187 | 187 | return array( |
@@ -190,10 +190,10 @@ discard block |
||
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | /** |
| 193 | - * Test base case scenario |
|
| 194 | - * |
|
| 195 | - * @dataProvider category_no_links_data |
|
| 196 | - */ |
|
| 193 | + * Test base case scenario |
|
| 194 | + * |
|
| 195 | + * @dataProvider category_no_links_data |
|
| 196 | + */ |
|
| 197 | 197 | function test_category_no_links($cat_id, $cat_name, $nb_links) |
| 198 | 198 | { |
| 199 | 199 | $this->template->expects($this->at(3)) |
@@ -209,10 +209,10 @@ discard block |
||
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | /** |
| 212 | - * Test data for the test_category_with_pages() function |
|
| 213 | - * |
|
| 214 | - * @return array Array of test data |
|
| 215 | - */ |
|
| 212 | + * Test data for the test_category_with_pages() function |
|
| 213 | + * |
|
| 214 | + * @return array Array of test data |
|
| 215 | + */ |
|
| 216 | 216 | public function category_with_pages_data() |
| 217 | 217 | { |
| 218 | 218 | return array( |
@@ -222,10 +222,10 @@ discard block |
||
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | /** |
| 225 | - * Test base case scenario |
|
| 226 | - * |
|
| 227 | - * @dataProvider category_with_pages_data |
|
| 228 | - */ |
|
| 225 | + * Test base case scenario |
|
| 226 | + * |
|
| 227 | + * @dataProvider category_with_pages_data |
|
| 228 | + */ |
|
| 229 | 229 | public function test_category_with_pages($cat_id, $cat_name, $parent_cat_id, $parent_cat_name, $nb_links, $page = 1, $sort_days = 0) |
| 230 | 230 | { |
| 231 | 231 | $controller = $this->get_controller(); |
@@ -13,10 +13,10 @@ discard block |
||
| 13 | 13 | class categories_routing_loader_test extends \phpbb_database_test_case |
| 14 | 14 | { |
| 15 | 15 | /** |
| 16 | - * Define the extensions to be tested |
|
| 17 | - * |
|
| 18 | - * @return array vendor/name of extension(s) to test |
|
| 19 | - */ |
|
| 16 | + * Define the extensions to be tested |
|
| 17 | + * |
|
| 18 | + * @return array vendor/name of extension(s) to test |
|
| 19 | + */ |
|
| 20 | 20 | static protected function setup_extensions() |
| 21 | 21 | { |
| 22 | 22 | return array('ernadoo/phpbbdirectory'); |
@@ -50,10 +50,10 @@ discard block |
||
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | - * Get the route collection from the categories_loader |
|
| 54 | - * |
|
| 55 | - * @return \Symfony\Component\Routing\RouteCollection |
|
| 56 | - */ |
|
| 53 | + * Get the route collection from the categories_loader |
|
| 54 | + * |
|
| 55 | + * @return \Symfony\Component\Routing\RouteCollection |
|
| 56 | + */ |
|
| 57 | 57 | public function get_categories_route_collection() |
| 58 | 58 | { |
| 59 | 59 | $collection = $this->loader->load('ernadoo_phpbbdirectory_route_controller', 'pages_extension'); |
@@ -65,10 +65,10 @@ discard block |
||
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
| 68 | - * Data set for test_page_loader |
|
| 69 | - * |
|
| 70 | - * @return array |
|
| 71 | - */ |
|
| 68 | + * Data set for test_page_loader |
|
| 69 | + * |
|
| 70 | + * @return array |
|
| 71 | + */ |
|
| 72 | 72 | public function page_loader_data() |
| 73 | 73 | { |
| 74 | 74 | return array( |
@@ -79,11 +79,11 @@ discard block |
||
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
| 82 | - * @dataProvider page_loader_data |
|
| 83 | - * |
|
| 84 | - * @param int $id Id of a categorie |
|
| 85 | - * @param string $expected Expected route of a categorie |
|
| 86 | - */ |
|
| 82 | + * @dataProvider page_loader_data |
|
| 83 | + * |
|
| 84 | + * @param int $id Id of a categorie |
|
| 85 | + * @param string $expected Expected route of a categorie |
|
| 86 | + */ |
|
| 87 | 87 | public function test_page_loader($id, $expected) |
| 88 | 88 | { |
| 89 | 89 | // Get a route instance |