11<?php
2-
3- /**
4- *
5- * PhpBB Gallery extension for the phpBB Forum Software package.
6- *
7- * @copyright (c) 2025 Your Name
8- * @license GNU General Public License, version 2 (GPL-2.0)
9- *
10- */
2+ <?php
113
124namespace phpbbgallery \tests \core ;
135/**
@@ -23,7 +15,6 @@ public function setUp() : void
2315 {
2416 parent ::setUp ();
2517
26- // Mock dependencies
2718 $ this ->template = $ this ->getMockBuilder (\phpbb \template \template::class)
2819 ->disableOriginalConstructor ()
2920 ->getMock ();
@@ -57,56 +48,6 @@ public function setUp() : void
5748 );
5849 }
5950
60- public function data_build_url ()
61- {
62- return array (
63- 'album ' => array (
64- 'album ' ,
65- array ('album_id ' => 5 ),
66- '/gallery/album/5 '
67- ),
68- 'image ' => array (
69- 'image ' ,
70- array ('image_id ' => 42 ),
71- '/gallery/image/42 '
72- ),
73- // Add more cases as needed
74- );
75- }
76-
77- /**
78- * @dataProvider data_build_url
79- */
80- public function test_build_url ($ type , $ params , $ expected )
81- {
82- $ result = $ this ->gallery_url ->build_url ($ type , $ params );
83- $ this ->assertEquals ($ expected , $ result );
84- }
85-
86- public function data_parse_url ()
87- {
88- return array (
89- 'album ' => array (
90- '/gallery/album/5 ' ,
91- array ('type ' => 'album ' , 'album_id ' => 5 )
92- ),
93- 'image ' => array (
94- '/gallery/image/42 ' ,
95- array ('type ' => 'image ' , 'image_id ' => 42 )
96- ),
97- // Add more cases as needed
98- );
99- }
100-
101- /**
102- * @dataProvider data_parse_url
103- */
104- public function test_parse_url ($ url , $ expected )
105- {
106- $ result = $ this ->gallery_url ->parse_url ($ url );
107- $ this ->assertEquals ($ expected , $ result );
108- }
109-
11051 public function data_path ()
11152 {
11253 return [
0 commit comments