TYPO3
7.6
Users
bogdan
Projects
Kapeli
Resources
Dash
Docsets
TYPO3
src
vendor
symfony
console
Tests
Descriptor
JsonDescriptorTest.php
Go to the documentation of this file.
1
<?php
2
3
/*
4
* This file is part of the Symfony package.
5
*
6
* (c) Fabien Potencier <fabien@symfony.com>
7
*
8
* For the full copyright and license information, please view the LICENSE
9
* file that was distributed with this source code.
10
*/
11
12
namespace
Symfony\Component\Console\Tests\Descriptor;
13
14
use
Symfony\Component\Console\Descriptor\JsonDescriptor
;
15
use
Symfony\Component\Console\Output\BufferedOutput
;
16
17
class
JsonDescriptorTest
extends
AbstractDescriptorTest
18
{
19
protected
function
getDescriptor
()
20
{
21
return
new
JsonDescriptor
();
22
}
23
24
protected
function
getFormat
()
25
{
26
return
'json'
;
27
}
28
29
protected
function
assertDescription
($expectedDescription, $describedObject)
30
{
31
$output =
new
BufferedOutput
(
BufferedOutput::VERBOSITY_NORMAL
,
true
);
32
$this->
getDescriptor
()->describe($output, $describedObject, array(
'raw_output'
=>
true
));
33
$this->assertEquals(json_decode(trim($expectedDescription),
true
), json_decode(trim(str_replace(PHP_EOL,
"\n"
, $output->fetch())),
true
));
34
}
35
}
Generated on Wed Nov 11 2015 01:51:58 for TYPO3 by
1.8.3