1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 01:36:57 +02:00

[ticket/11768] Updated phpbb\textformatter\s9e\factory::regenerate()

Returns an associative array rather than a numerically-indexed array. Feels
cleaner and more extensible.

PHPBB3-11768
This commit is contained in:
JoshyPHP
2015-02-15 03:08:36 +01:00
parent f6e3e41717
commit 6bd86a8e8a
6 changed files with 8 additions and 8 deletions

View File

@@ -84,7 +84,7 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
public function test_regenerate()
{
list($parser, $renderer) = $this->get_factory()->regenerate();
extract($this->get_factory()->regenerate());
$this->assertInstanceOf('s9e\\TextFormatter\\Parser', $parser);
$this->assertInstanceOf('s9e\\TextFormatter\\Renderer', $renderer);
@@ -113,7 +113,7 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
touch($old_file);
// Create a current renderer
list($parser, $renderer) = $factory->regenerate();
extract($factory->regenerate());
$new_file = $this->get_cache_dir() . get_class($renderer) . '.php';
// Tidy the cache

View File

@@ -82,7 +82,7 @@ class phpbb_textformatter_s9e_parser_test extends phpbb_test_case
->getMock();
$factory->expects($this->once())
->method('regenerate')
->will($this->returnValue(array($mock, false)));
->will($this->returnValue(array('parser' => $mock)));
$parser = new \phpbb\textformatter\s9e\parser(
new phpbb_mock_cache,

View File

@@ -61,7 +61,7 @@ class phpbb_textformatter_s9e_renderer_test extends phpbb_test_case
->getMock();
$factory->expects($this->once())
->method('regenerate')
->will($this->returnValue(array($mock, false)));
->will($this->returnValue(array('parser' => $mock)));
$renderer = new \phpbb\textformatter\s9e\renderer(
$cache,