createElement( 'a' ); DOMDataUtils::setDataMw( $elt, new DataMw( [ 'body' => (object)[ 'html' => 'old' ] ] ) ); $group = new Ref(); $group->processAttributeEmbeddedHTML( $this->createNoOpMock( ParsoidExtensionAPI::class ), $elt, fn () => 'new' ); $this->assertSame( 'new', DOMDataUtils::getDataMw( $elt )->body->html ); } // TODO: Incomplete, there are a few more public methods to test }