Merge "DatabaseMssql: Don't duplicate body of makeList()"
[mediawiki.git] / tests / phpunit / includes / api / ApiTestContext.php
blob17dad1fac5bffba1be3c3f7b46fbe60204dff4cb
1 <?php
3 class ApiTestContext extends RequestContext {
5 /**
6 * Returns a DerivativeContext with the request variables in place
8 * @param WebRequest $request WebRequest request object including parameters and session
9 * @param User|null $user User or null
10 * @return DerivativeContext
12 public function newTestContext( WebRequest $request, User $user = null ) {
13 $context = new DerivativeContext( $this );
14 $context->setRequest( $request );
15 if ( $user !== null ) {
16 $context->setUser( $user );
19 return $context;