|
| testPostingSubjectBuilder (string $subject, string $reply_prefix, string $optimized_repeated_reply_prefix, string $expected_result) |
|
◆ postingSubjectProvider()
static PostingReplySubjectBuilderTest::postingSubjectProvider |
( |
| ) |
|
|
static |
- Returns
- Generator<string, array{"subject": string, "reply_prefix": string, "optimized_repeated_reply_prefix": string, "expected_result": string}>
Definition at line 29 of file PostingReplySubjectBuilderTest.php.
31 yield
'Subject without reply prefix' => [
32 'subject' =>
'This is a subject',
33 'reply_prefix' =>
'Re:',
34 'optimized_repeated_reply_prefix' =>
'Re (%s):',
35 'expected_result' =>
'Re: This is a subject' 38 yield
'Subject without reply prefix and prefix without expected end character' => [
39 'subject' =>
'This is a subject',
40 'reply_prefix' =>
'Re',
41 'optimized_repeated_reply_prefix' =>
'Re (%s):',
42 'expected_result' =>
'Re: This is a subject' 45 yield
'Subject with repeated reply prefix' => [
46 'subject' =>
'Re: Re: Re: This is a subject',
47 'reply_prefix' =>
'Re:',
48 'optimized_repeated_reply_prefix' =>
'Re (%s):',
49 'expected_result' =>
'Re (4): This is a subject' 52 yield
'Subject with optimized repeated reply prefix' => [
53 'subject' =>
'Re (3): This is a subject',
54 'reply_prefix' =>
'Re:',
55 'optimized_repeated_reply_prefix' =>
'Re (%s):',
56 'expected_result' =>
'Re (4): This is a subject' 59 yield
'Subject with optimized repeated reply prefix (without spaces)' => [
60 'subject' =>
'Re(3): This is a subject',
61 'reply_prefix' =>
'Re:',
62 'optimized_repeated_reply_prefix' =>
'Re (%s):',
63 'expected_result' =>
'Re(4): This is a subject' 66 yield
'Subject with repeated reply prefix and repetition-prefix without expected end character' => [
67 'subject' =>
'Re: Re: Re: This is a subject',
68 'reply_prefix' =>
'Re:',
69 'optimized_repeated_reply_prefix' =>
'Re (%s)',
70 'expected_result' =>
'Re (4): This is a subject' 73 yield
'Subject with optimized repeated reply prefix and repetition-prefix without expected end character' => [
74 'subject' =>
'Re (3): This is a subject',
75 'reply_prefix' =>
'Re:',
76 'optimized_repeated_reply_prefix' =>
'Re (%s)',
77 'expected_result' =>
'Re (4): This is a subject' 80 yield
'Subject with optimized repeated reply prefix (without spaces) and repetition-prefix without expected end character' => [
81 'subject' =>
'Re(3): This is a subject',
82 'reply_prefix' =>
'Re:',
83 'optimized_repeated_reply_prefix' =>
'Re (%s)',
84 'expected_result' =>
'Re(4): This is a subject'
◆ testPostingSubjectBuilder()
PostingReplySubjectBuilderTest::testPostingSubjectBuilder |
( |
string |
$subject, |
|
|
string |
$reply_prefix, |
|
|
string |
$optimized_repeated_reply_prefix, |
|
|
string |
$expected_result |
|
) |
| |
Definition at line 89 of file PostingReplySubjectBuilderTest.php.
95 $posting_subject_builder = new \ILIAS\components\Forum\Subject\PostingReplySubjectBuilder(
97 $optimized_repeated_reply_prefix
99 $result = $posting_subject_builder->build($subject);
101 $this->assertSame($expected_result, $result);
The documentation for this class was generated from the following file: