mediawiki-extensions-Replac.../tests/phpunit/unit/SearchTest.php
Fomafix 83e425ab5a Use single quotes instead of double quotes
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#String_literals
Single quotes are preferred in all cases where they are equivalent to double quotes.

Change-Id: I808927475e3063a1a37fff9ab851d292acd847bf
2023-10-20 12:26:37 +00:00

20 lines
469 B
PHP

<?php
use MediaWiki\Extension\ReplaceText\Search;
/**
* @covers \MediaWiki\Extension\ReplaceText\Search
*/
class SearchTest extends \MediaWikiUnitTestCase {
public function testGetReplacedText() {
$text = 'This is the line being tested';
$search = 'line';
$replacement = 'word';
$regex = false;
$op = Search::getReplacedText( $text, $search, $replacement, $regex );
$trueOp = 'This is the word being tested';
$this->assertSame( $trueOp, $op );
}
}