File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -173,6 +173,20 @@ public function testWhenContainsAll()
173
173
return $ stringable ->studly ();
174
174
}));
175
175
}
176
+
177
+ public function testDirname ()
178
+ {
179
+ $ this ->assertSame ('/framework/tests ' , (string ) $ this ->stringable ('/framework/tests/Support ' )->dirname ());
180
+ $ this ->assertSame ('/framework ' , (string ) $ this ->stringable ('/framework/tests/Support ' )->dirname (2 ));
181
+
182
+ $ this ->assertSame ('/ ' , (string ) $ this ->stringable ('/framework/ ' )->dirname ());
183
+
184
+ $ this ->assertSame ('/ ' , (string ) $ this ->stringable ('/ ' )->dirname ());
185
+ $ this ->assertSame ('. ' , (string ) $ this ->stringable ('. ' )->dirname ());
186
+
187
+ // without slash
188
+ $ this ->assertSame ('. ' , (string ) $ this ->stringable ('framework ' )->dirname ());
189
+ }
176
190
177
191
public function testUcsplitOnStringable ()
178
192
{
You can’t perform that action at this time.
0 commit comments