TYPO3  7.6
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 
16 
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  {
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 }