setRequestURL( '/w/api.php' ); $env = new MockEnvironment( $request ); $context = $env->makeFauxContext(); $entryPoint = new ApiEntryPoint( $context, $env, $this->getServiceContainer() ); $entryPoint->enableOutputCapture(); $entryPoint->run(); $output = $entryPoint->getCapturedOutput(); $this->assertStringContainsString( '', $output ); $this->assertStringContainsString( '(pagetitle: (api-help-title))', $output ); // TODO: Check caching headers and such. } }