File tree 3 files changed +14
-1
lines changed
3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -2553,4 +2553,9 @@ public function getInactiveFaqsData(): array
2553
2553
2554
2554
return $ inactive ;
2555
2555
}
2556
+
2557
+ public function hasTitleAHash (string $ title ): bool
2558
+ {
2559
+ return strpos ($ title , '# ' );
2560
+ }
2556
2561
}
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
/**
4
- * FAQ meta data class for phpMyFAQ.
4
+ * FAQ meta-data class for phpMyFAQ.
5
+ *
5
6
* This Source Code Form is subject to the terms of the Mozilla Public License,
6
7
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
7
8
* obtain one at https://mozilla.org/MPL/2.0/.
@@ -33,6 +34,7 @@ class FaqMetaData
33
34
34
35
private ?string $ faqLanguage = null ;
35
36
37
+ /** @var int[]|null */
36
38
private ?array $ categories = null ;
37
39
38
40
/**
Original file line number Diff line number Diff line change @@ -47,4 +47,10 @@ public function testSetUser(): void
47
47
{
48
48
$ this ->assertInstanceOf (Faq::class, $ this ->faq ->setUser (-1 ));
49
49
}
50
+
51
+ public function testHasTitleAHash (): void
52
+ {
53
+ $ this ->assertTrue ($ this ->faq ->hasTitleAHash ('H#llo World! ' ));
54
+ $ this ->assertFalse ($ this ->faq ->hasTitleAHash ('Hallo World! ' ));
55
+ }
50
56
}
You can’t perform that action at this time.
0 commit comments