From 68d488a822cb510b7e96fb61e4cc0bdb040ab119 Mon Sep 17 00:00:00 2001 From: Kashif Date: Sun, 23 Oct 2016 22:24:04 +0200 Subject: [PATCH] added php and json config --- composer.json | 3 +- tests/DummyServices/jsonServicesConfig.json | 47 +++++++++++++++++++++ tests/DummyServices/phpServicesConfig.php | 19 +++++++++ 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 tests/DummyServices/jsonServicesConfig.json create mode 100644 tests/DummyServices/phpServicesConfig.php diff --git a/composer.json b/composer.json index 7701f2f..e46b5f3 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,8 @@ }, "require": { "php":">=5.5", - "container-interop/container-interop": "^1.1" + "container-interop/container-interop": "^1.1", + "mcustiel/php-simple-config": ">=1.2.0" }, "require-dev":{ "phpunit/phpunit": "4.8.*" diff --git a/tests/DummyServices/jsonServicesConfig.json b/tests/DummyServices/jsonServicesConfig.json new file mode 100644 index 0000000..6d97a74 --- /dev/null +++ b/tests/DummyServices/jsonServicesConfig.json @@ -0,0 +1,47 @@ +{ + "services": [ + { + "id": "class-a", + "class": "DummyServices\\ClassA" + + }, + { + "id": "class-b", + "class": "DummyServices\\ClassB", + "arguments": [ + { + "id": "class-a" + + } + + ] + + }, + { + "id": "class-c", + "class": "DummyServices\\ClassC", + "arguments": [ + { + "id": "class-d" + + } + + ] + + }, + { + "id": "class-d", + "class": "DummyServices\\ClassD", + "arguments": [ + { + "id": "class-c" + + } + + ] + + } + + ] + +} diff --git a/tests/DummyServices/phpServicesConfig.php b/tests/DummyServices/phpServicesConfig.php new file mode 100644 index 0000000..67280a7 --- /dev/null +++ b/tests/DummyServices/phpServicesConfig.php @@ -0,0 +1,19 @@ + array( + 'class'=>'Tests\\DummyServices\\ClassA', + ), + 'class-b' => array( + 'class'=>'Tests\\DummyServices\\ClassB', + 'arguments' => array( + 'class-a' + ) + ), + 'class-c' => array( + 'class'=>'Tests\\DummyServices\\ClassC', + 'arguments' => array( + 'class-b' + ) + ), +);