[Console] fixed tests

This commit is contained in:
Fabien Potencier 2013-10-04 11:08:13 +02:00
parent 5130c0317b
commit 600f3bb5db
22 changed files with 334 additions and 60 deletions

View File

@ -1 +1,4 @@
{"service":"service_1","public":true}
{
"service": "service_1",
"public": true
}

View File

@ -1 +1,4 @@
{"service":"service_2","public":false}
{
"service": "service_2",
"public": false
}

View File

@ -1 +1,27 @@
{"definitions":{"definition_1":{"class":"Full\\Qualified\\Class1","scope":"container","public":true,"synthetic":false,"file":null,"tags":[]}},"aliases":{"alias_1":{"service":"service_1","public":true},"alias_2":{"service":"service_2","public":false}},"services":{"service_container":"Symfony\\Component\\DependencyInjection\\ContainerBuilder"}}
{
"definitions": {
"definition_1": {
"class": "Full\\Qualified\\Class1",
"scope": "container",
"public": true,
"synthetic": false,
"file": null,
"tags": [
]
}
},
"aliases": {
"alias_1": {
"service": "service_1",
"public": true
},
"alias_2": {
"service": "service_2",
"public": false
}
},
"services": {
"service_container": "Symfony\\Component\\DependencyInjection\\ContainerBuilder"
}
}

View File

@ -4,23 +4,31 @@ Public services
Definitions
-----------
**`definition_1`:**
definition_1
~~~~~~~~~~~~
- Class: `Full\Qualified\Class1`
- Scope: `container`
- Public: yes
- Synthetic: no
Aliases
-------
**`alias_1`:**
alias_1
~~~~~~~
- Service: `service_1`
- Public: yes
**`alias_2`:**
alias_2
~~~~~~~
- Service: `service_2`
- Public: no
Services
--------

View File

@ -1,9 +1,6 @@
<info>[container]</info> <comment>Public</comment> services
+-------------------+-----------+--------------------------------------------------------+
| Service ID | Scope | Class name |
+-------------------+-----------+--------------------------------------------------------+
| alias_1 | n/a | alias for "service_1" |
| alias_2 | n/a | alias for "service_2" |
| definition_1 | container | Full\Qualified\Class1 |
| service_container | | Symfony\Component\DependencyInjection\ContainerBuilder |
+-------------------+-----------+--------------------------------------------------------+
Service ID Scope Class name
alias_1 n/a alias for "service_1"
alias_2 n/a alias for "service_2"
definition_1 container Full\Qualified\Class1
service_container Symfony\Component\DependencyInjection\ContainerBuilder

View File

@ -1 +1,55 @@
{"definitions":{"definition_1":{"class":"Full\\Qualified\\Class1","scope":"container","public":true,"synthetic":false,"file":null,"tags":[]},"definition_2":{"class":"Full\\Qualified\\Class2","scope":"container","public":false,"synthetic":true,"file":"\/path\/to\/file","tags":[{"name":"tag1","parameters":{"attr1":"val1","attr2":"val2"}},{"name":"tag1","parameters":{"attr3":"val3"}},{"name":"tag2","parameters":[]}]}},"aliases":{"alias_1":{"service":"service_1","public":true},"alias_2":{"service":"service_2","public":false}},"services":{"service_container":"Symfony\\Component\\DependencyInjection\\ContainerBuilder"}}
{
"definitions": {
"definition_1": {
"class": "Full\\Qualified\\Class1",
"scope": "container",
"public": true,
"synthetic": false,
"file": null,
"tags": [
]
},
"definition_2": {
"class": "Full\\Qualified\\Class2",
"scope": "container",
"public": false,
"synthetic": true,
"file": "\/path\/to\/file",
"tags": [
{
"name": "tag1",
"parameters": {
"attr1": "val1",
"attr2": "val2"
}
},
{
"name": "tag1",
"parameters": {
"attr3": "val3"
}
},
{
"name": "tag2",
"parameters": [
]
}
]
}
},
"aliases": {
"alias_1": {
"service": "service_1",
"public": true
},
"alias_2": {
"service": "service_2",
"public": false
}
},
"services": {
"service_container": "Symfony\\Component\\DependencyInjection\\ContainerBuilder"
}
}

View File

@ -4,13 +4,17 @@ Public and private services
Definitions
-----------
**`definition_1`:**
definition_1
~~~~~~~~~~~~
- Class: `Full\Qualified\Class1`
- Scope: `container`
- Public: yes
- Synthetic: no
**`definition_2`:**
definition_2
~~~~~~~~~~~~
- Class: `Full\Qualified\Class2`
- Scope: `container`
- Public: no
@ -23,17 +27,23 @@ Definitions
- Attr3: val3
- Tag: `tag2`
Aliases
-------
**`alias_1`:**
alias_1
~~~~~~~
- Service: `service_1`
- Public: yes
**`alias_2`:**
alias_2
~~~~~~~
- Service: `service_2`
- Public: no
Services
--------

View File

@ -1,10 +1,8 @@
<info>[container]</info> <comment>Public</comment> and <comment>private</comment> services
+-------------------+-----------+--------------------------------------------------------+
| Service ID | Scope | Class name |
+-------------------+-----------+--------------------------------------------------------+
| alias_1 | n/a | alias for "service_1" |
| alias_2 | n/a | alias for "service_2" |
| definition_1 | container | Full\Qualified\Class1 |
| definition_2 | container | Full\Qualified\Class2 |
| service_container | | Symfony\Component\DependencyInjection\ContainerBuilder |
+-------------------+-----------+--------------------------------------------------------+
Service ID Scope Class name
alias_1 n/a alias for "service_1"
alias_2 n/a alias for "service_2"
definition_1 container Full\Qualified\Class1
definition_2 container Full\Qualified\Class2
service_container Symfony\Component\DependencyInjection\ContainerBuilder

View File

@ -1 +1,38 @@
{"definitions":{"definition_2":{"class":"Full\\Qualified\\Class2","scope":"container","public":false,"synthetic":true,"file":"\/path\/to\/file","tags":[{"name":"tag1","parameters":{"attr1":"val1","attr2":"val2"}},{"name":"tag1","parameters":{"attr3":"val3"}},{"name":"tag2","parameters":[]}]}},"aliases":[],"services":[]}
{
"definitions": {
"definition_2": {
"class": "Full\\Qualified\\Class2",
"scope": "container",
"public": false,
"synthetic": true,
"file": "\/path\/to\/file",
"tags": [
{
"name": "tag1",
"parameters": {
"attr1": "val1",
"attr2": "val2"
}
},
{
"name": "tag1",
"parameters": {
"attr3": "val3"
}
},
{
"name": "tag2",
"parameters": [
]
}
]
}
},
"aliases": [
],
"services": [
]
}

View File

@ -4,7 +4,9 @@ Public and private services with tag `tag1`
Definitions
-----------
**`definition_2`:**
definition_2
~~~~~~~~~~~~
- Class: `Full\Qualified\Class2`
- Scope: `container`
- Public: no

View File

@ -1,7 +1,4 @@
<info>[container]</info> <comment>Public</comment> and <comment>private</comment> services with tag <info>tag1</info>
+--------------+-------+-------+-------+-----------+-----------------------+
| Service ID | attr1 | attr2 | attr3 | Scope | Class name |
+--------------+-------+-------+-------+-----------+-----------------------+
| definition_2 | val1 | val2 | | container | Full\Qualified\Class2 |
| " | | | val3 | | |
+--------------+-------+-------+-------+-----------+-----------------------+
Service ID attr1 attr2 attr3 Scope Class name
definition_2 val1 val2 container Full\Qualified\Class2
" val3

View File

@ -1 +1,20 @@
{"tag1":[{"class":"Full\\Qualified\\Class2","scope":"container","public":false,"synthetic":true,"file":"\/path\/to\/file"}],"tag2":[{"class":"Full\\Qualified\\Class2","scope":"container","public":false,"synthetic":true,"file":"\/path\/to\/file"}]}
{
"tag1": [
{
"class": "Full\\Qualified\\Class2",
"scope": "container",
"public": false,
"synthetic": true,
"file": "\/path\/to\/file"
}
],
"tag2": [
{
"class": "Full\\Qualified\\Class2",
"scope": "container",
"public": false,
"synthetic": true,
"file": "\/path\/to\/file"
}
]
}

View File

@ -4,17 +4,22 @@ Container tags
tag1
----
**`definition_2`:**
definition_2
~~~~~~~~~~~~
- Class: `Full\Qualified\Class2`
- Scope: `container`
- Public: no
- Synthetic: yes
- File: `/path/to/file`
tag2
----
**`definition_2`:**
definition_2
~~~~~~~~~~~~
- Class: `Full\Qualified\Class2`
- Scope: `container`
- Public: no

View File

@ -1 +1,10 @@
{"class":"Full\\Qualified\\Class1","scope":"container","public":true,"synthetic":false,"file":null,"tags":[]}
{
"class": "Full\\Qualified\\Class1",
"scope": "container",
"public": true,
"synthetic": false,
"file": null,
"tags": [
]
}

View File

@ -1 +1,28 @@
{"class":"Full\\Qualified\\Class2","scope":"container","public":false,"synthetic":true,"file":"\/path\/to\/file","tags":[{"name":"tag1","parameters":{"attr1":"val1","attr2":"val2"}},{"name":"tag1","parameters":{"attr3":"val3"}},{"name":"tag2","parameters":[]}]}
{
"class": "Full\\Qualified\\Class2",
"scope": "container",
"public": false,
"synthetic": true,
"file": "\/path\/to\/file",
"tags": [
{
"name": "tag1",
"parameters": {
"attr1": "val1",
"attr2": "val2"
}
},
{
"name": "tag1",
"parameters": {
"attr3": "val3"
}
},
{
"name": "tag2",
"parameters": [
]
}
]
}

View File

@ -1 +1,10 @@
{"array":[12,"Hello world!",true],"boolean":true,"integer":12,"string":"Hello world!"}
{
"array": [
12,
"Hello world!",
true
],
"boolean": true,
"integer": 12,
"string": "Hello world!"
}

View File

@ -1,9 +1,7 @@
<info>[container]</info> List of parameters
+-----------+--------------------------+
| Parameter | Value |
+-----------+--------------------------+
| array | [12,"Hello world!",true] |
| boolean | true |
| integer | 12 |
| string | Hello world! |
+-----------+--------------------------+
Parameter Value
array [12,"Hello world!",true]
boolean true
integer 12
string Hello world!

View File

@ -1 +1,19 @@
{"path":"\/hello\/{name}","host":"localhost","scheme":"http|https","method":"GET|HEAD","class":"Symfony\\Component\\Routing\\Route","defaults":{"name":"Joseph"},"requirements":{"name":"[a-z]+"},"options":{"compiler_class":"Symfony\\Component\\Routing\\RouteCompiler","opt1":"val1","opt2":"val2"},"pathRegex":"#^\/hello(?:\/(?P<name>[a-z]+))?$#s"}
{
"path": "\/hello\/{name}",
"host": "localhost",
"scheme": "http|https",
"method": "GET|HEAD",
"class": "Symfony\\Component\\Routing\\Route",
"defaults": {
"name": "Joseph"
},
"requirements": {
"name": "[a-z]+"
},
"options": {
"compiler_class": "Symfony\\Component\\Routing\\RouteCompiler",
"opt1": "val1",
"opt2": "val2"
},
"pathRegex": "#^\/hello(?:\/(?P<name>[a-z]+))?$#s"
}

View File

@ -1 +1,17 @@
{"path":"\/name\/add","host":"localhost","scheme":"http|https","method":"PUT|POST","class":"Symfony\\Component\\Routing\\Route","defaults":[],"requirements":"NO CUSTOM","options":{"compiler_class":"Symfony\\Component\\Routing\\RouteCompiler","opt1":"val1","opt2":"val2"},"pathRegex":"#^\/name\/add$#s"}
{
"path": "\/name\/add",
"host": "localhost",
"scheme": "http|https",
"method": "PUT|POST",
"class": "Symfony\\Component\\Routing\\Route",
"defaults": [
],
"requirements": "NO CUSTOM",
"options": {
"compiler_class": "Symfony\\Component\\Routing\\RouteCompiler",
"opt1": "val1",
"opt2": "val2"
},
"pathRegex": "#^\/name\/add$#s"
}

View File

@ -1 +1,38 @@
{"route_1":{"path":"\/hello\/{name}","host":"localhost","scheme":"http|https","method":"GET|HEAD","class":"Symfony\\Component\\Routing\\Route","defaults":{"name":"Joseph"},"requirements":{"name":"[a-z]+"},"options":{"compiler_class":"Symfony\\Component\\Routing\\RouteCompiler","opt1":"val1","opt2":"val2"},"pathRegex":"#^\/hello(?:\/(?P<name>[a-z]+))?$#s"},"route_2":{"path":"\/name\/add","host":"localhost","scheme":"http|https","method":"PUT|POST","class":"Symfony\\Component\\Routing\\Route","defaults":[],"requirements":"NO CUSTOM","options":{"compiler_class":"Symfony\\Component\\Routing\\RouteCompiler","opt1":"val1","opt2":"val2"},"pathRegex":"#^\/name\/add$#s"}}
{
"route_1": {
"path": "\/hello\/{name}",
"host": "localhost",
"scheme": "http|https",
"method": "GET|HEAD",
"class": "Symfony\\Component\\Routing\\Route",
"defaults": {
"name": "Joseph"
},
"requirements": {
"name": "[a-z]+"
},
"options": {
"compiler_class": "Symfony\\Component\\Routing\\RouteCompiler",
"opt1": "val1",
"opt2": "val2"
},
"pathRegex": "#^\/hello(?:\/(?P<name>[a-z]+))?$#s"
},
"route_2": {
"path": "\/name\/add",
"host": "localhost",
"scheme": "http|https",
"method": "PUT|POST",
"class": "Symfony\\Component\\Routing\\Route",
"defaults": [
],
"requirements": "NO CUSTOM",
"options": {
"compiler_class": "Symfony\\Component\\Routing\\RouteCompiler",
"opt1": "val1",
"opt2": "val2"
},
"pathRegex": "#^\/name\/add$#s"
}
}

View File

@ -1,5 +1,6 @@
route_1
-------
- Path: /hello/{name}
- Host: localhost
- Scheme: http|https
@ -10,12 +11,14 @@ route_1
- Requirements:
- `name`: [a-z]+
route_2
-------
- Path: /name/add
- Host: localhost
- Scheme: http|https
- Method: PUT|POST
- Class: Symfony\Component\Routing\Route
- Defaults: NONE
- Requirements: NONE
- Requirements: NONE

View File

@ -1,7 +1,5 @@
<info>[router]</info> Current routes
+---------+----------+------------+-----------+---------------+
| Name | Method | Scheme | Host | Path |
+---------+----------+------------+-----------+---------------+
| route_1 | GET|HEAD | http|https | localhost | /hello/{name} |
| route_2 | PUT|POST | http|https | localhost | /name/add |
+---------+----------+------------+-----------+---------------+
Name Method Scheme Host Path
route_1 GET|HEAD http|https localhost /hello/{name}
route_2 PUT|POST http|https localhost /name/add