DeclhTest: Fix string interpolation

Bug: T314096
Change-Id: I1c2a11c1481ca7d8e91e9c0468600ace9038e333
(cherry picked from commit 6081e9b01a)
This commit is contained in:
Reedy 2022-11-04 18:08:02 -06:00
parent 6f7cf56ceb
commit 3c3ad511c3

View file

@ -70,9 +70,9 @@ class DeclhTest extends MediaWikiUnitTestCase {
public function testSubscriptsForFontMod() {
$mods = [ 'rm','it','cal','bf' ];
foreach ( $mods as $mod ) {
$f = new Declh( "\\${mod}", new TexArray( new Literal( 'a' ) ) );
$this->assertEquals( [ "\\math${mod}{a}" ], $f->extractSubscripts(),
"Should extract subscripts for ${mod} font modification" );
$f = new Declh( "\\{$mod}", new TexArray( new Literal( 'a' ) ) );
$this->assertEquals( [ "\\math{$mod}{a}" ], $f->extractSubscripts(),
"Should extract subscripts for {$mod} font modification" );
}
}
}