1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-30 04:58:37 +01:00

[ticket/11450] Move mocked class into mock/metadata_manager.php

PHPBB3-11450
This commit is contained in:
Joas Schilling 2013-04-04 21:36:32 +02:00
parent d75af4109f
commit 65c407044e
2 changed files with 23 additions and 15 deletions

View File

@ -418,11 +418,11 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
* Get an instance of the metadata manager
*
* @param string $ext_name
* @return phpbb_extension_metadata_manager_test
* @return phpbb_mock_metadata_manager
*/
private function get_metadata_manager($ext_name)
{
return new phpbb_extension_metadata_manager_test(
return new phpbb_mock_metadata_manager(
$ext_name,
$this->config,
$this->extension_manager,
@ -431,16 +431,3 @@ class phpbb_extension_metadata_manager_test extends phpbb_database_test_case
);
}
}
class phpbb_extension_metadata_manager_test extends phpbb_extension_metadata_manager
{
public function set_metadata($metadata)
{
$this->metadata = $metadata;
}
public function merge_metadata($metadata)
{
$this->metadata = array_merge($this->metadata, $metadata);
}
}

View File

@ -0,0 +1,21 @@
<?php
/**
*
* @package testing
* @copyright (c) 2013 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
class phpbb_mock_metadata_manager extends phpbb_extension_metadata_manager
{
public function set_metadata($metadata)
{
$this->metadata = $metadata;
}
public function merge_metadata($metadata)
{
$this->metadata = array_merge($this->metadata, $metadata);
}
}