@@ -34,8 +34,8 @@ final class SetSniffPropertyTest extends TestCase
3434 */
3535 public function testSniffPropertiesGetSetWhenAllowed ($ name )
3636 {
37- $ sniffCode = "Fixtures.Category . {$ name }" ;
38- $ sniffClass = 'Fixtures\Sniffs\Category \\' .$ name .'Sniff ' ;
37+ $ sniffCode = "Fixtures.SetProperty . {$ name }" ;
38+ $ sniffClass = 'Fixtures\Sniffs\SetProperty \\' .$ name .'Sniff ' ;
3939 $ properties = [
4040 'arbitrarystring ' => 'arbitraryvalue ' ,
4141 'arbitraryarray ' => [
@@ -45,7 +45,7 @@ public function testSniffPropertiesGetSetWhenAllowed($name)
4545 ];
4646
4747 // Set up the ruleset.
48- $ standard = __DIR__ ."/ {$ name }Test.xml " ;
48+ $ standard = __DIR__ ."/SetProperty {$ name }Test.xml " ;
4949 $ config = new Config (["--standard= $ standard " ]);
5050 $ ruleset = new Ruleset ($ config );
5151
@@ -77,9 +77,9 @@ public function testSniffPropertiesGetSetWhenAllowed($name)
7777 public static function dataSniffPropertiesGetSetWhenAllowed ()
7878 {
7979 return [
80- 'Property allowed as explicitly declared ' => ['SetPropertyAllowedAsDeclared ' ],
81- 'Property allowed as sniff extends stdClass ' => ['SetPropertyAllowedViaStdClass ' ],
82- 'Property allowed as sniff has magic __set() method ' => ['SetPropertyAllowedViaMagicMethod ' ],
80+ 'Property allowed as explicitly declared ' => ['AllowedAsDeclared ' ],
81+ 'Property allowed as sniff extends stdClass ' => ['AllowedViaStdClass ' ],
82+ 'Property allowed as sniff has magic __set() method ' => ['AllowedViaMagicMethod ' ],
8383 ];
8484
8585 }//end dataSniffPropertiesGetSetWhenAllowed()
@@ -163,7 +163,7 @@ public function testSetPropertyThrowsErrorOnInvalidProperty()
163163 public function testSetPropertyThrowsErrorWhenPropertyOnlyAllowedViaAttribute ()
164164 {
165165 $ exceptionClass = 'PHP_CodeSniffer\Exceptions\RuntimeException ' ;
166- $ exceptionMsg = 'Ruleset invalid. Property "arbitrarystring" does not exist on sniff Fixtures.Category.SetPropertyNotAllowedViaAttribute ' ;
166+ $ exceptionMsg = 'Ruleset invalid. Property "arbitrarystring" does not exist on sniff Fixtures.SetProperty.NotAllowedViaAttribute ' ;
167167 if (method_exists ($ this , 'expectException ' ) === true ) {
168168 $ this ->expectException ($ exceptionClass );
169169 $ this ->expectExceptionMessage ($ exceptionMsg );
@@ -224,12 +224,12 @@ public function testSetPropertyDoesNotThrowErrorOnInvalidPropertyWhenSetForCateg
224224 */
225225 public function testDirectCallWithNewArrayFormatSetsProperty ()
226226 {
227- $ name = 'SetPropertyAllowedAsDeclared ' ;
228- $ sniffCode = "Fixtures.Category . {$ name }" ;
229- $ sniffClass = 'Fixtures\Sniffs\Category \\' .$ name .'Sniff ' ;
227+ $ name = 'AllowedAsDeclared ' ;
228+ $ sniffCode = "Fixtures.SetProperty . {$ name }" ;
229+ $ sniffClass = 'Fixtures\Sniffs\SetProperty \\' .$ name .'Sniff ' ;
230230
231231 // Set up the ruleset.
232- $ standard = __DIR__ ."/ {$ name }Test.xml " ;
232+ $ standard = __DIR__ ."/SetProperty {$ name }Test.xml " ;
233233 $ config = new Config (["--standard= $ standard " ]);
234234 $ ruleset = new Ruleset ($ config );
235235
@@ -275,12 +275,12 @@ public function testDirectCallWithNewArrayFormatSetsProperty()
275275 */
276276 public function testDirectCallWithOldArrayFormatSetsProperty ($ propertyValue )
277277 {
278- $ name = 'SetPropertyAllowedAsDeclared ' ;
279- $ sniffCode = "Fixtures.Category . {$ name }" ;
280- $ sniffClass = 'Fixtures\Sniffs\Category \\' .$ name .'Sniff ' ;
278+ $ name = 'AllowedAsDeclared ' ;
279+ $ sniffCode = "Fixtures.SetProperty . {$ name }" ;
280+ $ sniffClass = 'Fixtures\Sniffs\SetProperty \\' .$ name .'Sniff ' ;
281281
282282 // Set up the ruleset.
283- $ standard = __DIR__ ."/ {$ name }Test.xml " ;
283+ $ standard = __DIR__ ."/SetProperty {$ name }Test.xml " ;
284284 $ config = new Config (["--standard= $ standard " ]);
285285 $ ruleset = new Ruleset ($ config );
286286
@@ -376,12 +376,12 @@ public function testDirectCallWithOldArrayFormatThrowsDeprecationNotice()
376376 $ this ->setExpectedException ($ exceptionClass , $ exceptionMsg );
377377 }
378378
379- $ name = 'SetPropertyAllowedAsDeclared ' ;
380- $ sniffCode = "Fixtures.Category . {$ name }" ;
381- $ sniffClass = 'Fixtures\Sniffs\Category \\' .$ name .'Sniff ' ;
379+ $ name = 'AllowedAsDeclared ' ;
380+ $ sniffCode = "Fixtures.SetProperty . {$ name }" ;
381+ $ sniffClass = 'Fixtures\Sniffs\SetProperty \\' .$ name .'Sniff ' ;
382382
383383 // Set up the ruleset.
384- $ standard = __DIR__ ."/ {$ name }Test.xml " ;
384+ $ standard = __DIR__ ."/SetProperty {$ name }Test.xml " ;
385385 $ config = new Config (["--standard= $ standard " ]);
386386 $ ruleset = new Ruleset ($ config );
387387
0 commit comments