/** * Test... * * @covers JLanguage::setTransliterator * @todo Implement testSetTransliterator(). * * @return void */ public function testSetTransliterator() { $function1 = 'phpinfo'; $function2 = 'print'; $lang = new JLanguage(''); // Note: set -> $funtion1: set returns NULL and get returns $function1 $this->assertNull($lang->setTransliterator($function1)); $get = $lang->getTransliterator(); $this->assertEquals($function1, $get, 'Line: ' . __LINE__); $this->assertNotEquals($function2, $get, 'Line: ' . __LINE__); // Note: set -> $function2: set returns $function1 and get retuns $function2 $set = $lang->setTransliterator($function2); $this->assertEquals($function1, $set, 'Line: ' . __LINE__); $this->assertNotEquals($function2, $set, 'Line: ' . __LINE__); $this->assertEquals($function2, $lang->getTransliterator(), 'Line: ' . __LINE__); $this->assertNotEquals($function1, $lang->getTransliterator(), 'Line: ' . __LINE__); }