You are here

protected function JsonDescriptorTest::assertDescription in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php \Symfony\Component\Console\Tests\Descriptor\JsonDescriptorTest::assertDescription()

Overrides AbstractDescriptorTest::assertDescription

File

vendor/symfony/console/Tests/Descriptor/JsonDescriptorTest.php, line 29

Class

JsonDescriptorTest

Namespace

Symfony\Component\Console\Tests\Descriptor

Code

protected function assertDescription($expectedDescription, $describedObject) {
  $output = new BufferedOutput(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));
}