mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-11-27 16:10:15 +00:00
83e425ab5a
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
20 lines
469 B
PHP
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 );
|
|
}
|
|
}
|