TextTest.php (633B)
1 <?php 2 3 class TextTest extends PHPUnit_Framework_TestCase 4 { 5 /** 6 * When argument is existing key, then existing value should be returned 7 */ 8 public function testGet() 9 { 10 $this->assertEquals("The username or password is incorrect. Please try again.", Text::get('FEEDBACK_USERNAME_OR_PASSWORD_WRONG')); 11 } 12 13 /** 14 * When argument is null, should return null 15 */ 16 public function testGetWithNullKey() 17 { 18 $this->assertEquals(null, Text::get(null)); 19 } 20 21 /** 22 * When key does not exist in text data file, should return null 23 */ 24 public function testGetWithNonExistingKey() 25 { 26 $this->assertEquals(null, Text::get('XXX')); 27 } 28 }