createElement( 'a' ); DOMDataUtils::setDataMw( $elt, new DataMw( [ 'body' => (object)[ 'html' => 'old' ] ] ) ); $refs = new References( $this->createNoOpMock( Config::class ) ); $refs->processAttributeEmbeddedHTML( $this->createNoOpMock( ParsoidExtensionAPI::class ), $elt, fn () => 'new' ); $this->assertSame( 'new', DOMDataUtils::getDataMw( $elt )->body->html ); } // TODO: Incomplete, there are many more static and non-static methods to test }