DeclhTest: Fix string interpolation

Bug: T314096
Change-Id: I1c2a11c1481ca7d8e91e9c0468600ace9038e333
This commit is contained in:
Reedy 2022-11-04 18:08:02 -06:00
parent 7b90132b49
commit 6081e9b01a

View file

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