mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ReplaceText
synced 2024-12-18 17:23:11 +00:00
ee40a242a4
Bug: T315764 Change-Id: Ibc5e65bd2bc2ab8d667ead8428a20d3c66f72f99
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 );
|
|
}
|
|
}
|