|
| testPostingSubjectBuilder (string $subject, string $reply_prefix, string $optimized_repeated_reply_prefix, string $expected_result) |
| postingSubjectProvider More...
|
|
◆ 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 28 of file PostingReplySubjectBuilderTest.php.
30 yield
'Subject without reply prefix' => [
31 'subject' =>
'This is a subject',
32 'reply_prefix' =>
'Re:',
33 'optimized_repeated_reply_prefix' =>
'Re (%s):',
34 'expected_result' =>
'Re: This is a subject' 37 yield
'Subject without reply prefix and prefix without expected end character' => [
38 'subject' =>
'This is a subject',
39 'reply_prefix' =>
'Re',
40 'optimized_repeated_reply_prefix' =>
'Re (%s):',
41 'expected_result' =>
'Re: This is a subject' 44 yield
'Subject with repeated reply prefix' => [
45 'subject' =>
'Re: Re: Re: This is a subject',
46 'reply_prefix' =>
'Re:',
47 'optimized_repeated_reply_prefix' =>
'Re (%s):',
48 'expected_result' =>
'Re (4): This is a subject' 51 yield
'Subject with optimized repeated reply prefix' => [
52 'subject' =>
'Re (3): This is a subject',
53 'reply_prefix' =>
'Re:',
54 'optimized_repeated_reply_prefix' =>
'Re (%s):',
55 'expected_result' =>
'Re (4): This is a subject' 58 yield
'Subject with optimized repeated reply prefix (without spaces)' => [
59 'subject' =>
'Re(3): This is a subject',
60 'reply_prefix' =>
'Re:',
61 'optimized_repeated_reply_prefix' =>
'Re (%s):',
62 'expected_result' =>
'Re(4): This is a subject' 65 yield
'Subject with repeated reply prefix and repetition-prefix without expected end character' => [
66 'subject' =>
'Re: Re: Re: This is a subject',
67 'reply_prefix' =>
'Re:',
68 'optimized_repeated_reply_prefix' =>
'Re (%s)',
69 'expected_result' =>
'Re (4): This is a subject' 72 yield
'Subject with optimized repeated reply prefix and repetition-prefix without expected end character' => [
73 'subject' =>
'Re (3): This is a subject',
74 'reply_prefix' =>
'Re:',
75 'optimized_repeated_reply_prefix' =>
'Re (%s)',
76 'expected_result' =>
'Re (4): This is a subject' 79 yield
'Subject with optimized repeated reply prefix (without spaces) and repetition-prefix without expected end character' => [
80 'subject' =>
'Re(3): This is a subject',
81 'reply_prefix' =>
'Re:',
82 'optimized_repeated_reply_prefix' =>
'Re (%s)',
83 'expected_result' =>
'Re(4): This is a subject'
◆ testPostingSubjectBuilder()
PostingReplySubjectBuilderTest::testPostingSubjectBuilder |
( |
string |
$subject, |
|
|
string |
$reply_prefix, |
|
|
string |
$optimized_repeated_reply_prefix, |
|
|
string |
$expected_result |
|
) |
| |
postingSubjectProvider
Definition at line 90 of file PostingReplySubjectBuilderTest.php.
96 $posting_subject_builder = new \ILIAS\components\Forum\Subject\PostingReplySubjectBuilder(
98 $optimized_repeated_reply_prefix
100 $result = $posting_subject_builder->build($subject);
102 $this->assertSame($expected_result, $result);
The documentation for this class was generated from the following file: