You are here

class JsonDescriptorTest 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

Hierarchy

  • class \Symfony\Component\Console\Tests\Descriptor\AbstractDescriptorTest extends \Symfony\Component\Console\Tests\Descriptor\PHPUnit_Framework_TestCase

Expanded class hierarchy of JsonDescriptorTest

File

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

Namespace

Symfony\Component\Console\Tests\Descriptor
View source
class JsonDescriptorTest extends AbstractDescriptorTest {
  protected function getDescriptor() {
    return new JsonDescriptor();
  }
  protected function getFormat() {
    return 'json';
  }
  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));
  }

}

Members