Ejemplo n.º 1
0
 /**
  * @todo Implement testGetOverwrite().
  */
 public function testGetAndSetUpgrade()
 {
     $this->saveFactoryState();
     $newDbo = $this->getMock('test');
     JFactory::$database =& $newDbo;
     $this->object = JInstaller::getInstance();
     $this->object->setUpgrade(false);
     $this->assertThat($this->object->getUpgrade(), $this->equalTo(false), 'Get or Set Upgrade failed');
     $this->assertThat($this->object->setUpgrade(true), $this->equalTo(false), 'setUpgrade did not return the old value properly.');
     $this->assertThat($this->object->getUpgrade(), $this->equalTo(true), 'getUpgrade did not return the expected value.');
     $this->restoreFactoryState();
 }