r64356 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64355‎ | r64356 | r64357 >
Date:19:24, 29 March 2010
Author:maxsem
Status:ok
Tags:
Comment:
A bit more Message tests
Modified paths:
  • /trunk/phase3/maintenance/tests/MessageTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/tests/MessageTest.php
@@ -16,4 +16,18 @@
1717 $this->assertEquals( 'Main Page', Message::key( 'mainpage' )->text() );
1818 $this->assertEquals( '<i-dont-exist-evar>', Message::key( 'i-dont-exist-evar' )->text() );
1919 }
 20+
 21+ function testInLanguage() {
 22+ $this->assertEquals( 'Main Page', Message::key( 'mainpage' )->inLanguage( 'en' )->text() );
 23+ $this->assertEquals( 'Заглавная страница', Message::key( 'mainpage' )->inLanguage( 'ru' )->text() );
 24+ $this->assertEquals( 'Main Page', Message::key( 'mainpage' )->inLanguage( Language::factory( 'en' ) )->text() );
 25+ $this->assertEquals( 'Заглавная страница', Message::key( 'mainpage' )->inLanguage( Language::factory( 'ru' ) )->text() );
 26+ }
 27+
 28+ /**
 29+ * @expectedException
 30+ */
 31+ function testInLanguageThrows() {
 32+ Message::key( 'foo' )->inLanguage( 123 );
 33+ }
2034 }
\ No newline at end of file

Status & tagging log