Sha256: 56e3498901a8a859ef472a88c3a2c9c7b5d2fbcf830ece6011c7f972262f666d

Contents?: true

Size: 1.04 KB

Versions: 18

Compression:

Stored size: 1.04 KB

Contents

<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Console\Tests\Descriptor;

use Symfony\Component\Console\Descriptor\JsonDescriptor;
use Symfony\Component\Console\Output\BufferedOutput;

class JsonDescriptorTest extends AbstractDescriptorTest
{
    protected function getDescriptor()
    {
        return new JsonDescriptor();
    }

    protected function getFormat()
    {
        return 'json';
    }

    protected function assertDescription($expectedDescription, $describedObject, array $options = [])
    {
        $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true);
        $this->getDescriptor()->describe($output, $describedObject, $options + ['raw_output' => true]);
        $this->assertEquals(json_decode(trim($expectedDescription), true), json_decode(trim(str_replace(PHP_EOL, "\n", $output->fetch())), true));
    }
}

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
dependabot-composer-0.119.0.beta1 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.113.19 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.112.1 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.111.57 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.111.56 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.111.52 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.111.50 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.111.25 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.111.17 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.111.15 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.110.13 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.108.11 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.108.8 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.107.47 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.107.39 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.107.36 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.107.28 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php
dependabot-composer-0.107.14 helpers/vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php