File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace TOC ;
4
4
5
+ use Cocur \Slugify \SlugifyInterface ;
5
6
use PHPUnit \Framework \TestCase ;
6
7
7
- class UniqueSluggerTest extends TestCase
8
+ class UniqueSlugifyTest extends TestCase
8
9
{
9
10
public function testInstantiateWithDefaults (): void
10
11
{
11
12
$ slugger = new UniqueSlugify ();
12
- $ this ->assertInstanceOf (UniqueSlugify::class, $ slugger );
13
+ $ this ->assertInstanceOf (SluggerInterface::class, $ slugger );
14
+ $ this ->assertInstanceOf (SlugifyInterface::class, $ slugger );
13
15
}
14
16
15
17
public function testAsciiStrSlugify (): void
@@ -30,4 +32,11 @@ public function testUnicodeSlugify(): void
30
32
$ slugger = new UniqueSlugify ();
31
33
$ this ->assertSame ('s-c-o-u-g-i ' , $ slugger ->makeSlug ('ş ç ö ü ğ ı ' ));
32
34
}
35
+
36
+ public function testSlugifyMethod (): void
37
+ {
38
+ $ slugger = new UniqueSlugify ();
39
+ $ this ->assertSame ('test ' , $ slugger ->slugify ('test ' ));
40
+ $ this ->assertSame ('test-1 ' , $ slugger ->slugify ('test ' ));
41
+ }
33
42
}
You can’t perform that action at this time.
0 commit comments