Added config loading

This commit is contained in:
Josh Sherman 2014-10-03 06:30:02 -04:00
parent 908fff2193
commit 1a589efe12

View file

@ -65,6 +65,24 @@ namespace
// work. That logic is off in ResourceTest // work. That logic is off in ResourceTest
public function testFoundWithUID() public function testFoundWithUID()
{ {
$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['SERVER_NAME'] = '127.0.0.1';
file_put_contents('/tmp/pickles.php', '<?php
$config = [
"environments" => [
"local" => "127.0.0.1",
"production" => "123.456.789.0",
],
"pickles" => [
"namespace" => "",
],
"datasources" => [],
];
');
Pickles\Config::getInstance('/tmp/pickles.php');
$response = json_encode([ $response = json_encode([
'meta' => [ 'meta' => [
'status' => 405, 'status' => 405,