0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-11-09 23:28:42 +00:00
htmlpurifier/tests/HTMLPurifier/LanguageFactoryTest.php
Edward Z. Yang ce7efc11b2 Delete language tests that are interfering with PSR-0 compatibility
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
2020-06-28 20:38:16 -04:00

35 lines
804 B
PHP

<?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();
}
public 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);
}
}
// vim: et sw=4 sts=4