@@ -132,10 +132,16 @@ public function testToGruntTaskWithGherkin()
132132 $ this ->assertNull ($ command ->toGruntTask ('gherkinlint ' ));
133133 }
134134
135- public function testToGruntTaskWithStyles ()
135+ public function testToGruntTaskWithStylesCss ()
136136 {
137137 $ command = $ this ->newCommand ();
138138
139+ $ task = $ command ->toGruntTask ('stylelint ' );
140+ $ this ->assertInstanceOf (GruntTaskModel::class, $ task );
141+ $ this ->assertSame ('stylelint ' , $ task ->taskName );
142+ $ this ->assertSame ('' , $ task ->buildDirectory );
143+ $ this ->assertSame ($ this ->pluginDir , $ task ->workingDirectory );
144+
139145 $ task = $ command ->toGruntTask ('stylelint:css ' );
140146 $ this ->assertInstanceOf (GruntTaskModel::class, $ task );
141147 $ this ->assertSame ('stylelint:css ' , $ task ->taskName );
@@ -144,7 +150,31 @@ public function testToGruntTaskWithStyles()
144150
145151 $ this ->fs ->remove ($ this ->pluginDir . '/styles.css ' );
146152
153+ $ this ->assertNull ($ command ->toGruntTask ('stylelint ' ));
147154 $ this ->assertNull ($ command ->toGruntTask ('stylelint:css ' ));
155+ }
156+
157+ public function testToGruntTaskWithStylesScss ()
158+ {
159+ $ command = $ this ->newCommand ();
160+ $ this ->fs ->mkdir ($ this ->pluginDir . '/scss ' );
161+ $ this ->fs ->rename ($ this ->pluginDir . '/styles.css ' , $ this ->pluginDir . '/scss/styles.scss ' );
162+
163+ $ task = $ command ->toGruntTask ('stylelint ' );
164+ $ this ->assertInstanceOf (GruntTaskModel::class, $ task );
165+ $ this ->assertSame ('stylelint ' , $ task ->taskName );
166+ $ this ->assertSame ('' , $ task ->buildDirectory );
167+ $ this ->assertSame ($ this ->pluginDir , $ task ->workingDirectory );
168+
169+ $ task = $ command ->toGruntTask ('stylelint:scss ' );
170+ $ this ->assertInstanceOf (GruntTaskModel::class, $ task );
171+ $ this ->assertSame ('stylelint:scss ' , $ task ->taskName );
172+ $ this ->assertSame ('' , $ task ->buildDirectory );
173+ $ this ->assertSame ($ this ->pluginDir , $ task ->workingDirectory );
174+
175+ $ this ->fs ->remove ($ this ->pluginDir . '/scss ' );
176+
177+ $ this ->assertNull ($ command ->toGruntTask ('stylelint ' ));
148178 $ this ->assertNull ($ command ->toGruntTask ('stylelint:scss ' ));
149179 }
150180
0 commit comments