aboutsummaryrefslogtreecommitdiffstats
path: root/tests/extension/phpbb_extension_metadata_manager_test.php
blob: 0d115d37eb8d9035aa177e3a988f2e042ec5605f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
*
* @package testing
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/

class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
{
	protected $class_loader;
	protected $extension_manager;

	public function getDataSet()
	{
		return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/extensions.xml');
	}

	protected function setUp()
	{
		parent::setUp();

		$this->extension_manager = new phpbb_extension_manager(
			$this->new_dbal(),
			new phpbb_config(array()),
			'phpbb_ext',
			dirname(__FILE__) . '/',
			'.php',
			new phpbb_mock_cache
		);
	}

	public function test_bar()
	{
		$phpbb_extension_metadata_manager = new phpbb_extension_metadata_manager(
			'bar',
			$this->new_dbal(),
			$this->extension_manager,
			dirname(__FILE__) . '/',
			'.php',
			new phpbb_template(
				dirname(__FILE__) . '/',
				'.php',
				new phpbb_config(array()),
				new phpbb_user(),
				new phpbb_style_resource_locator()
			),
			new phpbb_config(array())
		);

		//$this->assertEquals(array('bar', 'foo', 'vendor/moo'), array_keys($this->extension_manager->all_available()));
	}
}