diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/cache/apcu_driver_test.php | 17 | ||||
| -rw-r--r-- | tests/template/template_test.php | 2 | ||||
| -rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 4 | 
3 files changed, 18 insertions, 5 deletions
diff --git a/tests/cache/apcu_driver_test.php b/tests/cache/apcu_driver_test.php index 9de1d82a15..57f640c313 100644 --- a/tests/cache/apcu_driver_test.php +++ b/tests/cache/apcu_driver_test.php @@ -49,10 +49,27 @@ class phpbb_cache_apcu_driver_test extends phpbb_cache_common_test_case  	protected function setUp()  	{ +		global $phpbb_container, $phpbb_root_path; +  		parent::setUp(); +		$phpbb_container = new phpbb_mock_container_builder(); +		$phpbb_container->setParameter('core.cache_dir', $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/'); +  		$this->driver = new \phpbb\cache\driver\apcu;  		$this->driver->purge();  	} + +	public function test_purge() +	{ +		/* add a cache entry which does not match our key */ +		$foreign_key = 'test_' . $this->driver->key_prefix . 'test'; +		$this->assertSame(true, apcu_store($foreign_key, 0, 600)); +		$this->assertSame(true, apcu_exists($foreign_key)); + +		parent::test_purge(); + +		$this->assertSame(true, apcu_exists($foreign_key)); +	}  } diff --git a/tests/template/template_test.php b/tests/template/template_test.php index 0f761abc76..727f35e9d2 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -364,7 +364,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case  				array(),  				array(),  				array(), -				"Value'\n1 O'Clock\nValue\\x27\n1\\x20O\\x27Clock", +				"Value'\n1 O'Clock\nValue\\u0027\n1\\u0020O\\u0027Clock",  				array('VARIABLE' => "Value'", '1_VARIABLE' => "1 O'Clock"),  			),  			array( diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index e1daa4558a..12a296a4bf 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -1176,10 +1176,6 @@ class phpbb_functional_test_case extends phpbb_test_case  			}  		} -		// Bypass time restriction that said that if the lastclick time (i.e. time when the form was opened) -		// is not at least 2 seconds before submission, cancel the form -		$form_data['lastclick'] = 0; -  		// I use a request because the form submission method does not allow you to send data that is not  		// contained in one of the actual form fields that the browser sees (i.e. it ignores "hidden" inputs)  		// Instead, I send it as a request with the submit button "post" set to true.  | 
