From d37f2d10f02b6a7a2b12e4b21284df310f39d3e6 Mon Sep 17 00:00:00 2001 From: JoshyPHP Date: Tue, 3 Mar 2015 02:14:09 +0100 Subject: [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 --- tests/text_formatter/s9e/factory_test.php | 1 - tests/text_formatter/s9e/renderer_test.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/text_formatter') diff --git a/tests/text_formatter/s9e/factory_test.php b/tests/text_formatter/s9e/factory_test.php index d78765b7d5..a1378514b4 100644 --- a/tests/text_formatter/s9e/factory_test.php +++ b/tests/text_formatter/s9e/factory_test.php @@ -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'; diff --git a/tests/text_formatter/s9e/renderer_test.php b/tests/text_formatter/s9e/renderer_test.php index 17d358c3ce..248b38206a 100644 --- a/tests/text_formatter/s9e/renderer_test.php +++ b/tests/text_formatter/s9e/renderer_test.php @@ -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() -- cgit v1.2.1