1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/11768] Removed the cached renderer

We don't need to cache an instance of the renderer, we can just instantiate
it every time we need one.

PHPBB3-11768
This commit is contained in:
JoshyPHP
2015-03-03 02:14:09 +01:00
parent 6cb3fb6140
commit d37f2d10f0
4 changed files with 4 additions and 10 deletions

View File

@@ -94,7 +94,6 @@ class phpbb_textformatter_s9e_factory_test extends phpbb_database_test_case
$renderer_data = $this->cache->get('_foo_renderer');
$this->assertEquals($parser, $this->cache->get('_foo_parser'), 'The parser was not cached');
$this->assertEquals(get_class($renderer), $renderer_data['class']);
$this->assertEquals(serialize($renderer), $renderer_data['renderer']);
$this->assertInstanceOf('s9e\\TextFormatter\\Plugins\\Censor\\Helper', $renderer_data['censor']);
$file = $this->get_cache_dir() . get_class($renderer) . '.php';

View File

@@ -34,7 +34,7 @@ class phpbb_textformatter_s9e_renderer_test extends phpbb_test_case
$cache->expects($this->once())
->method('get')
->with('_foo_renderer')
->will($this->returnValue(array('class' => 'renderer_foo', 'renderer' => serialize($mock))));
->will($this->returnValue(array('class' => 'renderer_foo')));
$factory = $this->getMockBuilder('phpbb\\textformatter\\s9e\\factory')
->disableOriginalConstructor()