Skip to content
This repository has been archived by the owner on May 12, 2019. It is now read-only.

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnadoO committed Jul 10, 2018
1 parent 55df093 commit be8481d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 4 additions & 1 deletion tests/controller/controller_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public function setUp()
$phpEx
);

$cache_path = $phpbb_root_path . 'cache/files';
$this->temp = new \phpbb\filesystem\temp($this->filesystem, $cache_path);

$this->lang = new \phpbb\language\language(
new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)
);
Expand Down Expand Up @@ -170,7 +173,7 @@ public function setUp()

$factory = new \phpbb\files\factory($phpbb_container);

$phpbb_container->set('files.types.remote', new \phpbb\files\types\remote($this->config, $factory, $this->lang, new \bantu\IniGetWrapper\IniGetWrapper, $this->request, $phpbb_root_path));
$phpbb_container->set('files.types.remote', new \phpbb\files\types\remote($this->config, $factory, $this->temp, $this->lang, new \bantu\IniGetWrapper\IniGetWrapper, $this->request, $phpbb_root_path));

$factory = new \phpbb\files\factory($phpbb_container);

Expand Down
5 changes: 4 additions & 1 deletion tests/core/controller_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public function setUp()
$phpEx
);

$cache_path = $phpbb_root_path . 'cache/files';
$this->temp = new \phpbb\filesystem\temp($this->filesystem, $cache_path);

$this->lang = new \phpbb\language\language(
new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)
);
Expand Down Expand Up @@ -125,7 +128,7 @@ public function setUp()

$factory = new \phpbb\files\factory($phpbb_container);

$phpbb_container->set('files.types.remote', new \phpbb\files\types\remote($this->config, $factory, $this->lang, new \bantu\IniGetWrapper\IniGetWrapper, $this->request, $phpbb_root_path));
$phpbb_container->set('files.types.remote', new \phpbb\files\types\remote($this->config, $factory, $this->temp,$this->lang, new \bantu\IniGetWrapper\IniGetWrapper, $this->request, $phpbb_root_path));

$factory = new \phpbb\files\factory($phpbb_container);

Expand Down
8 changes: 4 additions & 4 deletions tests/core/phpbbdirectory_cat_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,29 +72,29 @@ function test_make_cat_jumpbox()
->withConsecutive(
array('jumpbox_forums', array(
'FORUM_ID' => 1,
'BREADCRUMB_NAME' => 'Catégorie 1',
'FORUM_NAME' => 'Catégorie 1',
'S_FORUM_COUNT' => 0,
'LINK' => 'ernadoo_phpbbdirectory_dynamic_route_1',
)),
array('jumpbox_forums', array(
'FORUM_ID' => 2,
'BREADCRUMB_NAME' => 'Catégorie 2',
'FORUM_NAME' => 'Catégorie 2',
'S_FORUM_COUNT' => 1,
'LINK' => 'ernadoo_phpbbdirectory_dynamic_route_2',
)),
array('jumpbox_forums.level', array(
)),
array('jumpbox_forums', array(
'FORUM_ID' => 3,
'BREADCRUMB_NAME' => 'Catégorie 3',
'FORUM_NAME' => 'Catégorie 3',
'S_FORUM_COUNT' => 2,
'LINK' => 'ernadoo_phpbbdirectory_dynamic_route_3',
)),
array('jumpbox_forums.level', array(
)),
array('jumpbox_forums', array(
'FORUM_ID' => 4,
'BREADCRUMB_NAME' => 'Catégorie 4',
'FORUM_NAME' => 'Catégorie 4',
'S_FORUM_COUNT' => 3,
'LINK' => 'ernadoo_phpbbdirectory_dynamic_route_4',
)),
Expand Down

0 comments on commit be8481d

Please sign in to comment.