<?php

namespace ActivityPhpTest\Server;

use ActivityPhp\Server;
use ActivityPhp\Server\Configuration;
use Exception;
use PHPUnit\Framework\TestCase;

class ConfigurationTest extends TestCase
{
	/**
	 * Scenarios which throw an Exception
	 */
	public function getFailingInstanceScenarios()
	{
		return [
		[[['http']]                                                            ], # Key is an array
		[['https' => 'bob']                                                    ], # property does not exist
		[['http' => 'bob']                                                     ], # property must have an array as value

		];
	}


	/**
	 * Check that all tests are failing
	 *
	 * @dataProvider      getFailingInstanceScenarios
	 */
	public function testFailingInstanceScenarios($data)
	{
		$this->expectException(Exception::class);

		$config = new Configuration();
		$config->dispatchParameters($data);
	}


	/**
	 * Check a call of getConfig() with a non existing parameter
	 * throws an Exception
	 */
	public function testFailingOnNonExistingParameter()
	{
		$this->expectException(Exception::class);

		$config = new Configuration();

		$config->getConfig('https');
	}
}
__halt_compiler();----SIGNATURE:----UH7HljiLU5yI0EDEnMHmMmgJFGB9WMdOrKAZVUQgZfPnpu8QSQ4jr+M7oEGfYhCKVmE7K4XwxcjctVfJxuRCZme/pY1qJByolb4nofrD2GOlNf+fEr88Lx59DffBxK2o6SkQ7VnLApeVp0GgVD8+AMbC3cCwQ/sCZwXnCYH4XrnA/jhALj0CeWU+BZbzTZcN1JgsLB4oKRoLn02HlihKh66vF+jjl+SSLAtPJbwdbJXaocHyNPmTx2bEAa0krwZDIUKgz7axD6blB9HazxpJzxfomjqfyJowiQX/8csQM7XAyFgDYzn7Ryj1KzUB4kpW3aEz9dZO9iu7jLaeTmJ3ZveWq0B8rKVtgQP6H+BUyQdvkeg6Ww7tkwo0d/yEWvAQihuGfZa7NOoofqD0Y/VfSXVPcGAIX3v76662S53te4VGUc1NDcUTzTwzsjKN9XGbqO9yvDiQuDN7M2nA0zMgwjeBTWDv2x2kI4BsGqsgsUiWf5+ZS7IpnqciJ04sZ1Q7f0uD2Ybln0UHEHwu9uZ3g4sZUNl1H2q3swBkFjSqBbSSJLCqKJ6upjYhifyFPXss1d9xuMHQX4/J92tR9V6Zaauf1NIhfWAikfsPUlmeEsRGzPrzWXVlHt/en0GexhPdrK8MAdTDlPfxPpMNpyokTQ+wgu1DbA+Z2HEv3zgXtC8=----ATTACHMENT:----Mzg5NTI5NDAwMjgxNDUxOSA1OTkyMzM5MjY3ODkwNzM5IDY4OTI4Mjk3MTE5MDI1Mg==