getServiceContainer() ->get( VisualEditorParsoidClientFactory::SERVICE_NAME ); $this->assertInstanceOf( VisualEditorParsoidClientFactory::class, $veParsoidClientFactory ); } private function newClientFactory() { $httpRequestFactory = $this->createNoOpMock( HttpRequestFactory::class, [ 'createMultiClient' ] ); $httpRequestFactory->method( 'createMultiClient' )->willReturn( $this->createNoOpMock( MultiHttpClient::class ) ); return new VisualEditorParsoidClientFactory( $this->createNoOpMock( PageRestHelperFactory::class ) ); } /** * @covers ::createParsoidClient */ public function testGetClient() { $authority = $this->createNoOpMock( Authority::class ); $factory = $this->newClientFactory(); $client = $factory->createParsoidClient( $authority ); $this->assertInstanceOf( DirectParsoidClient::class, $client ); } }