use KernelTestBehaviour;
private StructEncoder
$encoder;
protected function setUp(): void
{ $this->encoder =
$this->
getContainer()->
get(StructEncoder::
class);
} public function testApiAliasIsSet(): void
{ $foo =
new MyTestStruct('foo', 'bar'
);
$encoded =
$this->encoder->
encode($foo,
new ResponseFields([]));
static::
assertEquals( ['foo' => 'foo', 'bar' => 'bar', 'apiAlias' => 'test-struct'
],
$encoded );
} public function testIncludesByApiAlias(): void
{