Skip to content

Commit

Permalink
Forum: Fix unit test deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansenDatabay committed Oct 28, 2024
1 parent 421b96f commit 7caa856
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions components/ILIAS/Forum/tests/PostingReplySubjectBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,64 +23,64 @@
class PostingReplySubjectBuilderTest extends TestCase
{
/**
* @return Generator<string, array{"subject": string, "prefix": string, "repetition_prefix": string, "expected": string}>
* @return Generator<string, array{"subject": string, "reply_prefix": string, "optimized_repeated_reply_prefix": string, "expected_result": string}>
*/
public static function postingSubjectProvider(): Generator
{
yield 'Subject without reply prefix' => [
'subject' => 'This is a subject',
'prefix' => 'Re:',
'repetition_prefix' => 'Re (%s):',
'expected' => 'Re: This is a subject'
'reply_prefix' => 'Re:',
'optimized_repeated_reply_prefix' => 'Re (%s):',
'expected_result' => 'Re: This is a subject'
];

yield 'Subject without reply prefix and prefix without expected end character' => [
'subject' => 'This is a subject',
'prefix' => 'Re',
'repetition_prefix' => 'Re (%s):',
'expected' => 'Re: This is a subject'
'reply_prefix' => 'Re',
'optimized_repeated_reply_prefix' => 'Re (%s):',
'expected_result' => 'Re: This is a subject'
];

yield 'Subject with repeated reply prefix' => [
'subject' => 'Re: Re: Re: This is a subject',
'prefix' => 'Re:',
'repetition_prefix' => 'Re (%s):',
'expected' => 'Re (4): This is a subject'
'reply_prefix' => 'Re:',
'optimized_repeated_reply_prefix' => 'Re (%s):',
'expected_result' => 'Re (4): This is a subject'
];

yield 'Subject with optimized repeated reply prefix' => [
'subject' => 'Re (3): This is a subject',
'prefix' => 'Re:',
'repetition_prefix' => 'Re (%s):',
'expected' => 'Re (4): This is a subject'
'reply_prefix' => 'Re:',
'optimized_repeated_reply_prefix' => 'Re (%s):',
'expected_result' => 'Re (4): This is a subject'
];

yield 'Subject with optimized repeated reply prefix (without spaces)' => [
'subject' => 'Re(3): This is a subject',
'prefix' => 'Re:',
'repetition_prefix' => 'Re (%s):',
'expected' => 'Re(4): This is a subject'
'reply_prefix' => 'Re:',
'optimized_repeated_reply_prefix' => 'Re (%s):',
'expected_result' => 'Re(4): This is a subject'
];

yield 'Subject with repeated reply prefix and repetition-prefix without expected end character' => [
'subject' => 'Re: Re: Re: This is a subject',
'prefix' => 'Re:',
'repetition_prefix' => 'Re (%s)',
'expected' => 'Re (4): This is a subject'
'reply_prefix' => 'Re:',
'optimized_repeated_reply_prefix' => 'Re (%s)',
'expected_result' => 'Re (4): This is a subject'
];

yield 'Subject with optimized repeated reply prefix and repetition-prefix without expected end character' => [
'subject' => 'Re (3): This is a subject',
'prefix' => 'Re:',
'repetition_prefix' => 'Re (%s)',
'expected' => 'Re (4): This is a subject'
'reply_prefix' => 'Re:',
'optimized_repeated_reply_prefix' => 'Re (%s)',
'expected_result' => 'Re (4): This is a subject'
];

yield 'Subject with optimized repeated reply prefix (without spaces) and repetition-prefix without expected end character' => [
'subject' => 'Re(3): This is a subject',
'prefix' => 'Re:',
'repetition_prefix' => 'Re (%s)',
'expected' => 'Re(4): This is a subject'
'reply_prefix' => 'Re:',
'optimized_repeated_reply_prefix' => 'Re (%s)',
'expected_result' => 'Re(4): This is a subject'
];
}

Expand Down

0 comments on commit 7caa856

Please sign in to comment.