Exemplo n.º 1
0
 /**
  * @test
  */
 public function newAgentChangeEntity()
 {
     $pfAgent = new PluginFusioninventoryAgent();
     // Load Agent
     $this->assertTrue($pfAgent->getFromDBByQuery("WHERE `device_id` = 'port004.bureau.siprossii.com-2013-01-01-16-27-27' " . "LIMIT 1"), "Could not load agent");
     $pfAgent->setAgentWithComputerid(100, 'port004.bureau.siprossii.com-2013-01-01-16-27-27', 0);
     $pfAgent = new PluginFusioninventoryAgent();
     $a_agents = current($pfAgent->find("`computers_id`='100'"));
     $this->assertEquals(0, $a_agents['entities_id']);
 }