diff options
author | friendica <info@friendica.com> | 2012-07-18 03:59:10 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-07-18 03:59:10 -0700 |
commit | 22cf19e174bcee88b44968f2773d1bad2da2b54d (patch) | |
tree | f4e01db6f73754418438b020c2327e18c256653c /lib/htmlpurifier/tests/HTMLPurifier/LanguageFactoryTest.php | |
parent | 7a40f4354b32809af3d0cfd6e3af0eda02ab0e0a (diff) | |
download | volse-hubzilla-22cf19e174bcee88b44968f2773d1bad2da2b54d.tar.gz volse-hubzilla-22cf19e174bcee88b44968f2773d1bad2da2b54d.tar.bz2 volse-hubzilla-22cf19e174bcee88b44968f2773d1bad2da2b54d.zip |
bad sync with github windows client
Diffstat (limited to 'lib/htmlpurifier/tests/HTMLPurifier/LanguageFactoryTest.php')
-rw-r--r-- | lib/htmlpurifier/tests/HTMLPurifier/LanguageFactoryTest.php | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/lib/htmlpurifier/tests/HTMLPurifier/LanguageFactoryTest.php b/lib/htmlpurifier/tests/HTMLPurifier/LanguageFactoryTest.php deleted file mode 100644 index 9fea24f42..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/LanguageFactoryTest.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -class HTMLPurifier_LanguageFactoryTest extends HTMLPurifier_Harness -{ - - /** - * Protected reference of global factory we're testing. - */ - protected $factory; - - public function setUp() { - $this->factory = HTMLPurifier_LanguageFactory::instance(); - parent::setUp(); - } - - function test() { - - $this->config->set('Core.Language', 'en'); - $language = $this->factory->create($this->config, $this->context); - - $this->assertIsA($language, 'HTMLPurifier_Language'); - $this->assertIdentical($language->code, 'en'); - - // lazy loading test - $this->assertIdentical(count($language->messages), 0); - $language->load(); - $this->assertNotEqual(count($language->messages), 0); - - } - - function testFallback() { - - $this->config->set('Core.Language', 'en-x-test'); - $language = $this->factory->create($this->config, $this->context); - - $this->assertIsA($language, 'HTMLPurifier_Language_en_x_test'); - $this->assertIdentical($language->code, 'en-x-test'); - - $language->load(); - - // test overloaded message - $this->assertIdentical($language->getMessage('HTMLPurifier'), 'HTML Purifier X'); - - // test inherited message - $this->assertIdentical($language->getMessage('LanguageFactoryTest: Pizza'), 'Pizza'); - - } - - function testFallbackWithNoClass() { - $this->config->set('Core.Language', 'en-x-testmini'); - $language = $this->factory->create($this->config, $this->context); - $this->assertIsA($language, 'HTMLPurifier_Language'); - $this->assertIdentical($language->code, 'en-x-testmini'); - $language->load(); - $this->assertIdentical($language->getMessage('HTMLPurifier'), 'HTML Purifier XNone'); - $this->assertIdentical($language->getMessage('LanguageFactoryTest: Pizza'), 'Pizza'); - $this->assertIdentical($language->error, false); - } - - function testNoSuchLanguage() { - $this->config->set('Core.Language', 'en-x-testnone'); - $language = $this->factory->create($this->config, $this->context); - $this->assertIsA($language, 'HTMLPurifier_Language'); - $this->assertIdentical($language->code, 'en-x-testnone'); - $this->assertIdentical($language->error, true); - } - -} - -// vim: et sw=4 sts=4 |