diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2007-09-14 13:18:58 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2007-09-14 13:18:58 +0200 |
commit | 8f416baead93a48e5799e44b8bd2e2c4859f4e04 (patch) | |
tree | cd47ac55eb80a39e3225e8b4f3161b88ea16c2cf /tests/ArticleTest.php | |
parent | d7d08bd1a17618c7d77a6b9b2989e9f7293d6ed6 (diff) |
auf Version 1.11 aktualisiert; Login-Bug behoben
Diffstat (limited to 'tests/ArticleTest.php')
-rw-r--r-- | tests/ArticleTest.php | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/tests/ArticleTest.php b/tests/ArticleTest.php index bd678565..a65e1ee3 100644 --- a/tests/ArticleTest.php +++ b/tests/ArticleTest.php @@ -1,20 +1,11 @@ <?php -require_once( 'PHPUnit.php' ); -require_once( '../includes/Defines.php' ); -require_once( '../includes/Article.php' ); - -class ArticleTest extends PHPUnit_TestCase { +class ArticleTest extends PHPUnit_Framework_TestCase { var $saveGlobals = array(); - function ArticleTest( $name ) { - $this->PHPUnit_TestCase( $name ); - } - function setUp() { $globalSet = array( 'wgLegacyEncoding' => false, - 'wgUseLatin1' => false, 'wgCompressRevisions' => false, 'wgInputEncoding' => 'utf-8', 'wgOutputEncoding' => 'utf-8' ); @@ -101,20 +92,6 @@ class ArticleTest extends PHPUnit_TestCase { Revision::getRevisionText( $row ), "getRevisionText" ); } - function testCompressRevisionTextLatin1() { - $GLOBALS['wgUseLatin1'] = true; - $row->old_text = "Wiki est l'\xe9cole superieur !"; - $row->old_flags = Revision::compressRevisionText( $row->old_text ); - $this->assertFalse( false !== strpos( $row->old_flags, 'utf-8' ), - "Flags should not contain 'utf-8'" ); - $this->assertFalse( false !== strpos( $row->old_flags, 'gzip' ), - "Flags should not contain 'gzip'" ); - $this->assertEquals( "Wiki est l'\xe9cole superieur !", - $row->old_text, "Direct check" ); - $this->assertEquals( "Wiki est l'\xe9cole superieur !", - Revision::getRevisionText( $row ), "getRevisionText" ); - } - function testCompressRevisionTextUtf8Gzip() { $GLOBALS['wgCompressRevisions'] = true; $row->old_text = "Wiki est l'\xc3\xa9cole superieur !"; @@ -128,23 +105,6 @@ class ArticleTest extends PHPUnit_TestCase { $this->assertEquals( "Wiki est l'\xc3\xa9cole superieur !", Revision::getRevisionText( $row ), "getRevisionText" ); } - - function testCompressRevisionTextLatin1Gzip() { - $GLOBALS['wgCompressRevisions'] = true; - $GLOBALS['wgUseLatin1'] = true; - $row = new stdClass; - $row->old_text = "Wiki est l'\xe9cole superieur !"; - $row->old_flags = Revision::compressRevisionText( $row->old_text ); - $this->assertFalse( false !== strpos( $row->old_flags, 'utf-8' ), - "Flags should not contain 'utf-8'" ); - $this->assertTrue( false !== strpos( $row->old_flags, 'gzip' ), - "Flags should contain 'gzip'" ); - $this->assertEquals( "Wiki est l'\xe9cole superieur !", - gzinflate( $row->old_text ), "Direct check" ); - $this->assertEquals( "Wiki est l'\xe9cole superieur !", - Revision::getRevisionText( $row ), "getRevisionText" ); - } - } -?>
\ No newline at end of file + |