11<?php
2+
23declare (strict_types=1 );
34
45namespace PhpList \RestBundle \Tests \Integration \Composer ;
1213 */
1314class ScriptsTest extends TestCase
1415{
15- /**
16- * @test
17- */
18- public function publicDirectoryHasBeenCreated ()
16+ public function testPublicDirectoryHasBeenCreated ()
1917 {
20- static ::assertDirectoryExists ($ this ->getAbsolutePublicDirectoryPath ());
18+ self ::assertDirectoryExists ($ this ->getAbsolutePublicDirectoryPath ());
2119 }
2220
23- /**
24- * @return string
25- */
2621 private function getAbsolutePublicDirectoryPath (): string
2722 {
2823 return dirname (__DIR__ , 3 ) . '/public/ ' ;
@@ -31,7 +26,7 @@ private function getAbsolutePublicDirectoryPath(): string
3126 /**
3227 * @return string[][]
3328 */
34- public function publicDirectoryFilesDataProvider (): array
29+ public static function publicDirectoryFilesDataProvider (): array
3530 {
3631 return [
3732 'production entry point ' => ['app.php ' ],
@@ -42,26 +37,18 @@ public function publicDirectoryFilesDataProvider(): array
4237 }
4338
4439 /**
45- * @test
46- * @param string $fileName
4740 * @dataProvider publicDirectoryFilesDataProvider
4841 */
49- public function publicDirectoryFilesExist (string $ fileName )
42+ public function testPublicDirectoryFilesExist (string $ fileName )
5043 {
51- static ::assertFileExists ($ this ->getAbsolutePublicDirectoryPath () . $ fileName );
44+ self ::assertFileExists ($ this ->getAbsolutePublicDirectoryPath () . $ fileName );
5245 }
5346
54- /**
55- * @test
56- */
57- public function binariesDirectoryHasBeenCreated ()
47+ public function testBinariesDirectoryHasBeenCreated ()
5848 {
59- static ::assertDirectoryExists ($ this ->getAbsoluteBinariesDirectoryPath ());
49+ self ::assertDirectoryExists ($ this ->getAbsoluteBinariesDirectoryPath ());
6050 }
6151
62- /**
63- * @return string
64- */
6552 private function getAbsoluteBinariesDirectoryPath (): string
6653 {
6754 return dirname (__DIR__ , 3 ) . '/bin/ ' ;
@@ -70,115 +57,90 @@ private function getAbsoluteBinariesDirectoryPath(): string
7057 /**
7158 * @return string[][]
7259 */
73- public function binariesDataProvider (): array
60+ public static function binariesDataProvider (): array
7461 {
7562 return [
7663 'Symfony console ' => ['console ' ],
7764 ];
7865 }
7966
8067 /**
81- * @test
82- * @param string $fileName
8368 * @dataProvider binariesDataProvider
8469 */
85- public function binariesExist (string $ fileName )
70+ public function testBinariesExist (string $ fileName )
8671 {
87- static ::assertFileExists ($ this ->getAbsoluteBinariesDirectoryPath () . $ fileName );
72+ self ::assertFileExists ($ this ->getAbsoluteBinariesDirectoryPath () . $ fileName );
8873 }
8974
90- /**
91- * @return string
92- */
9375 private function getBundleConfigurationFilePath (): string
9476 {
9577 return dirname (__DIR__ , 3 ) . '/config/bundles.yml ' ;
9678 }
9779
98- /**
99- * @test
100- */
101- public function bundleConfigurationFileExists ()
80+ public function testBundleConfigurationFileExists ()
10281 {
103- static ::assertFileExists ($ this ->getBundleConfigurationFilePath ());
82+ self ::assertFileExists ($ this ->getBundleConfigurationFilePath ());
10483 }
10584
10685 /**
10786 * @return string[][]
10887 */
109- public function bundleClassNameDataProvider (): array
88+ public static function bundleClassNameDataProvider (): array
11089 {
11190 return [
112- 'framework bundle ' => ['Symfony \\ Bundle \\ FrameworkBundle \ \FrameworkBundle ' ],
113- 'rest bundle ' => ['PhpList \\ RestBundle \ \PhpListRestBundle ' ],
91+ 'framework bundle ' => ['Symfony\Bundle\FrameworkBundle\FrameworkBundle ' ],
92+ 'rest bundle ' => ['PhpList\RestBundle\PhpListRestBundle ' ],
11493 ];
11594 }
11695
11796 /**
118- * @test
119- * @param string $bundleClassName
12097 * @dataProvider bundleClassNameDataProvider
12198 */
122- public function bundleConfigurationFileContainsModuleBundles (string $ bundleClassName )
99+ public function testBundleConfigurationFileContainsModuleBundles (string $ bundleClassName )
123100 {
124101 $ fileContents = file_get_contents ($ this ->getBundleConfigurationFilePath ());
125102
126- static :: assertContains ($ bundleClassName , $ fileContents );
103+ self :: assertStringContainsString ($ bundleClassName , $ fileContents );
127104 }
128105
129- /**
130- * @return string
131- */
132106 private function getModuleRoutesConfigurationFilePath (): string
133107 {
134108 return dirname (__DIR__ , 3 ) . '/config/routing_modules.yml ' ;
135109 }
136-
137- /**
138- * @test
139- */
140- public function moduleRoutesConfigurationFileExists ()
110+ public function testModuleRoutesConfigurationFileExists ()
141111 {
142- static ::assertFileExists ($ this ->getModuleRoutesConfigurationFilePath ());
112+ self ::assertFileExists ($ this ->getModuleRoutesConfigurationFilePath ());
143113 }
144114
145115 /**
146116 * @return string[][]
147117 */
148- public function moduleRoutingDataProvider (): array
118+ public static function moduleRoutingDataProvider (): array
149119 {
150120 return [
151121 'route name ' => ['phplist/rest-api.rest-api ' ],
152122 'resource ' => ["resource: '@PhpListRestBundle/Controller/' " ],
153- 'type ' => ['type: annotation ' ],
123+ 'type ' => ['type: attribute ' ],
154124 ];
155125 }
156126
157127 /**
158- * @test
159- * @param string $routeSearchString
160128 * @dataProvider moduleRoutingDataProvider
161129 */
162- public function moduleRoutesConfigurationFileContainsModuleRoutes (string $ routeSearchString )
130+ public function testModuleRoutesConfigurationFileContainsModuleRoutes (string $ routeSearchString )
163131 {
164132 $ fileContents = file_get_contents ($ this ->getModuleRoutesConfigurationFilePath ());
165133
166- static :: assertContains ($ routeSearchString , $ fileContents );
134+ self :: assertStringContainsString ($ routeSearchString , $ fileContents );
167135 }
168136
169- /**
170- * @test
171- */
172- public function parametersConfigurationFileExists ()
137+ public function testParametersConfigurationFileExists ()
173138 {
174- static ::assertFileExists (dirname (__DIR__ , 3 ) . '/config/parameters.yml ' );
139+ self ::assertFileExists (dirname (__DIR__ , 3 ) . '/config/parameters.yml ' );
175140 }
176141
177- /**
178- * @test
179- */
180- public function modulesConfigurationFileExists ()
142+ public function testModulesConfigurationFileExists ()
181143 {
182- static ::assertFileExists (dirname (__DIR__ , 3 ) . '/config/config_modules.yml ' );
144+ self ::assertFileExists (dirname (__DIR__ , 3 ) . '/config/config_modules.yml ' );
183145 }
184146}
0 commit comments