/**
  * @expectedException FsapiException
  * @expectedExceptionCode 400
  * @dataProvider additionProviderFileGet400
  */
 public function testExceptionHasRight400CodeInProcessors($url, $method)
 {
     $_SERVER['REQUEST_URI'] = $url;
     $_SERVER['REQUEST_METHOD'] = $method;
     $processorSelector = new FileSystemRequestSellector();
     $restProcessor = new RootRequestProcessor($processorSelector);
     $restProcessor->ProcessRequest();
 }
Beispiel #2
0
<?php

/**
 * Created by PhpStorm.
 * User: Michael
 * Date: 31-Jan-16
 * Time: 15:49
 */
include_once 'common.php';
if (!file_exists(WORKING_FOLDER)) {
    mkdir(WORKING_FOLDER, true);
}
try {
    $processorSelector = new FileSystemRequestSellector();
    $restProcessor = new RootRequestProcessor($processorSelector);
    $restProcessor->ProcessRequest();
} catch (Exception $exception) {
    SendError($exception);
}