<?php

declare(strict_types=1);

// SPDX-FileCopyrightText: 2015-2023 Artur Weigandt https://wlabs.de/kontakt
//
// SPDX-License-Identifier: GPL-3.0-or-later

namespace Art4\JsonApiClient\Tests\BC;

use Art4\JsonApiClient\Input\Input;
use Art4\JsonApiClient\Manager;
use PHPUnit\Framework\TestCase;

class ManagerTest extends TestCase
{
    /**
     * This test will test a custom implementation of the Manager interface.
     */
    public function testBcForManagerInterface(): void
    {
        /**
         * DO NOT CHANGE THIS CLASS!
         *
         * This anonymous class represents an implementation in user code
         */
        $class = new class implements Manager {
            /**
             * Parse the input
             *
             * @param \Art4\JsonApiClient\Input\Input $input
             *
             * @return \Art4\JsonApiClient\Accessable
             */
            public function parse(Input $input)
            {
                throw new \Exception('not implemented');
            }

            /**
             * Get a factory from the manager
             *
             * @return \Art4\JsonApiClient\Factory
             */
            public function getFactory()
            {
                throw new \Exception('not implemented');
            }

            /**
             * Get a param by key
             *
             * @param string $key
             * @param mixed  $default
             *
             * @return mixed
             */
            public function getParam($key, $default)
            {
                throw new \Exception('not implemented');
            }
        };

        /** @phpstan-ignore-next-line */
        $this->assertInstanceOf(Manager::class, $class);
    }
}
