/**
 * Create a new scenario test server.
 * @function test.scenarioTests._startScenarioTestServer
 * @returns {object} - A new scenario test server.
 */
var util = require('util'),
    port = require('../../ports')['scenario_test'],
    newContext = require('../../serverside/context').newScenarioTestContext,
    newLogger = require('../../serverside/logger').newServerLogger,
    newServer = require('../../serverside/server').newStaticServer;

module.exports = function () {
    var context = newContext(),
        logger = newLogger(context),
        server = newServer(context);
    server.listen(port);
    logger.serverStarted(port);
    server._localBaseUrl = util.format('http://localhost:%s', port);
    return server;
};