Inheritance: extends PHPUnit_Framework_TestCase
Ejemplo n.º 1
0
 protected function setUp()
 {
     $queryConditionArgs = array("fieldName" => "name", "operator" => "LIKE", "value" => "Matthias", "sql" => "");
     $queryCondition = new QueryCondition($queryConditionArgs);
     $queryConditions = array($queryCondition);
     $styleMap = new StyleMap();
     $queryArgs = array("name" => "Test", "conditions" => $queryConditions, "styleMap" => $styleMap);
     $this->queryData = $queryArgs;
     $this->routeBase = '/query/';
     $this->serviceName = "mapbender.query.manager";
     $this->updateRoute = $this->routeBase . 'update';
     $this->authErrorMessage = "Failed to get/remove Query because of a lack of permissions!";
     $this->saveErrorMessage = "Failed to get/remove Query for given id. It was probably not correctly saved. Check the save/update test case.";
     parent::setUp();
 }
Ejemplo n.º 2
0
 public static function setUpBeforeClass()
 {
     self::$app = new Router();
     self::$app->addRule('App\\DB\\ProductsRepository', ['shared' => true, 'constructParams' => [array(new Product(1, "Cassete Recorder", 100.0), new Product(2, "Tractor Beam", 7.99))]]);
 }