File tree 1 file changed +14
-0
lines changed
test/SmrTest/lib/functions
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 10
10
#[CoversFunction('smrBBCode ' )]
11
11
class BbifyTest extends TestCase {
12
12
13
+ #[TestWith(['No tag ' , 'No tag ' ])]
14
+ #[TestWith(["Multi \nline " , "Multi<br /> \nline " ])]
15
+ public function test_no_tag (string $ input , string $ expect ): void {
16
+ $ result = bbify ($ input , gameID: 0 );
17
+ self ::assertSame ($ expect , $ result );
18
+ }
19
+
13
20
public function test_verbatim (): void {
14
21
$ result = bbify ('[verbatim]Hello[/verbatim] ' , gameID: 0 , noLinks: true );
15
22
$ expect = '<tt>Hello</tt> ' ;
@@ -24,4 +31,11 @@ public function test_race(bool $noLinks, string $expect): void {
24
31
self ::assertSame ($ expect , $ result );
25
32
}
26
33
34
+ public function test_race_invalid_id (): void {
35
+ // Returned unmodified if an exception is thrown (e.g. invalid race)
36
+ $ input = '[race=700] ' ;
37
+ $ result = bbify ($ input , gameID: 0 );
38
+ self ::assertSame ($ input , $ result );
39
+ }
40
+
27
41
}
You can’t perform that action at this time.
0 commit comments