⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 summaryaction_test.class.php

📁 一个用PHP编写的
💻 PHP
字号:
<?php

	lt_include( PLOG_CLASS_PATH."class/test/helpers/lifetypetestcase.class.php" );

	/**
	 * \ingroup Test
	 *
	 * Test case for the SummaryAction class, such as verifying that setting the
	 * language based on the "lang" parameter in summary.php works as expected
	 */
	class SummaryAction_Test extends LifeTypeTestCase
	{
		/**
		 * Mantis case 985: http://bugs.lifetype.net/view.php?id=985
		 * Verifies that the "lang" parameter works also in the front page. It checks
		 * this by requesting summary.php using the es_ES locale and checking that
		 * the returned content contains one particular string (that is part of the
		 * Spanish locale)
		 */
		function testLanguageChangeViaLangParameterInRequest()
		{
			lt_include( PLOG_CLASS_PATH."class/config/config.class.php" );
			$config =& Config::getConfig();
			
			$url = $config->getValue( "base_url" )."/summary.php";
			
			// first set it to Spanish
			$this->assertHTTPResponseContains( $url."?lang=es_ES", "Bit醕oras nuevas", "Unable to change the locale in summary.php via the 'lang' parameter!" );
			// and then back to english again
			$this->assertHTTPResponseContains( $url."?lang=en_UK", "Newest Blogs", "Unable to change the locale in summary.php via the 'lang' parameter!" );
		}		
	}
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -