- $this->fail( "Should have raised a UsageException" );
- } catch ( UsageException $e ) {
- $this->assertEquals( 'nosuchsection', $e->getCodeString() );
+ $this->fail( "Should have raised an ApiUsageException" );
+ } catch ( ApiUsageException $e ) {
+ $this->assertTrue( self::apiExceptionHasCode( $e, 'nosuchsection' ) );