<?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. */namespaceSymfony\Component\Console\Tests\Descriptor;useSymfony\Component\Console\Descriptor\JsonDescriptor;useSymfony\Component\Console\Output\BufferedOutput;classJsonDescriptorTestextendsAbstractDescriptorTest{protectedfunctiongetDescriptor(){returnnewJsonDescriptor();}protectedfunctiongetFormat(){return'json';}protectedfunctionassertDescription($expectedDescription,$describedObject){$output=newBufferedOutput(BufferedOutput::VERBOSITY_NORMAL,true);$this->getDescriptor()->describe($output,$describedObject,array('raw_output'=>true));$this->assertEquals(json_decode(trim($expectedDescription),true),json_decode(trim(str_replace(PHP_EOL,"\n",$output->fetch())),true));}}