use Symfony\Component\Serializer\Mapping\Factory\ClassMetadataFactoryInterface;
use Symfony\Component\Serializer\Mapping\Loader\AnnotationLoader;
use Symfony\Component\Serializer\Tests\Dummy\DummyClassOne;
/**
* @author Loïc Frémont <lc.fremont@gmail.com>
*/
class DebugCommandTest extends TestCase
{ public function testOutputWithClassArgument() { $command =
new DebugCommand(new ClassMetadataFactory(new AnnotationLoader()));
$tester =
new CommandTester($command);
$tester->
execute(['class' => DummyClassOne::
class],
['decorated' => false
]);
$this->
assertSame(<<<TXT
Symfony\Component\Serializer\Tests\Dummy\DummyClassOne
------------------------------------------------------
+----------+-------------------------------------+
| Property | Options |
+----------+-------------------------------------+
| code | [ |
| | "groups" => [ |
| | "book:read", |
| | "book:write" |
| | ], |
| | "maxDepth" => 1, |
| | "serializedName" => "identifier", |
| | "ignore" => true, |
| | "normalizationContexts" => [ |
| | "*" => [ |
| | "groups" => [ |
| | "book:read" |
| | ] |
| | ] |
| | ], |
| | "denormalizationContexts" => [ |
| | "*" => [ |
| | "groups" => [ |
| | "book:write" |
| | ] |
| | ] |
| | ] |
| | ] |
| name | [ |
| | "groups" => [], |
| | "maxDepth" => null, |
| | "serializedName" => null, |
| | "ignore" => false, |
| | "normalizationContexts" => [], |
| | "denormalizationContexts" => [] |
| | ] |
+----------+-------------------------------------+