MyTestStruct example

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($foonew ResponseFields([]));

        static::assertEquals(
            ['foo' => 'foo', 'bar' => 'bar', 'apiAlias' => 'test-struct'],
            $encoded
        );
    }

    public function testIncludesByApiAlias(): void
    {
        
Home | Imprint | This part of the site doesn't use cookies.