/** * Test... * * @covers JLanguage::setDebug * @covers JLanguage::getDebug * * @return void */ public function testGetSetDebug() { $current = $this->object->getDebug(); $this->assertEquals( $current, $this->object->setDebug(true), 'Line: ' . __LINE__ ); $this->object->setDebug(false); $this->assertFalse( $this->object->getDebug(), 'Line: ' . __LINE__ ); $this->object->setDebug(true); $this->assertTrue( $this->object->getDebug(), 'Line: ' . __LINE__ ); $this->object->setDebug(0); $this->assertFalse( $this->object->getDebug(), 'Line: ' . __LINE__ ); $this->object->setDebug(1); $this->assertTrue( $this->object->getDebug(), 'Line: ' . __LINE__ ); $this->object->setDebug(''); $this->assertFalse( $this->object->getDebug(), 'Line: ' . __LINE__ ); $this->object->setDebug('test'); $this->assertTrue( $this->object->getDebug(), 'Line: ' . __LINE__ ); $this->object->setDebug('0'); $this->assertFalse( $this->object->getDebug(), 'Line: ' . __LINE__ ); }
/** * @todo Implement testGetDebug(). */ public function testGetDebug() { $lang = new JLanguage(''); // The first time you run the method returns NULL // Only if there is an setDebug, this test is wrong $this->assertFalse($lang->getDebug()); }