Ejemplo n.º 1
0
 function getServiceContent()
 {
     if (!$this->serviceContent) {
         $this->serviceContent = $this->makeSoapCall('RetrieveServiceContent', \Vmwarephp\Factory\SoapMessage::makeForServiceInstance());
     }
     return $this->serviceContent;
 }
Ejemplo n.º 2
0
 function getServiceContent()
 {
     require_once 'TypeDefinitions.inc';
     if (!$this->serviceContent) {
         $this->serviceContent = $this->makeSoapCall('RetrieveServiceContent', \Vmwarephp\Factory\SoapMessage::makeForServiceInstance());
     }
     return $this->serviceContent;
 }
Ejemplo n.º 3
0
 private function stubServiceContent($hash)
 {
     $serviceContent = new \ServiceContent();
     foreach ($hash as $key => $value) {
         $serviceContent->{$key} = $value;
     }
     $this->vmwareSoapClient->expects($this->any())->method('RetrieveServiceContent')->with(\Vmwarephp\Factory\SoapMessage::makeForServiceInstance())->will($this->returnValue(new \RetrieveServiceContentResponse($serviceContent)));
 }
Ejemplo n.º 4
0
 function testItMakesASoapMessageForAMethodCallOnAManagedObject()
 {
     $service = \Mockery::mock('\\Vmwarephp\\Service');
     $reference = new ManagedObjectReference('vm151', 'VirtualMachine');
     $managedObject = new \Vmwarephp\ManagedObject($service, $reference);
     # Method invocation arguments will be passed as an array of arrays
     $arguments = array(array('firstArgument'), array('secondArgument'));
     $expectedMessage = array('_this' => $reference, 'firstArgument', 'secondArgument');
     $this->assertEquals($expectedMessage, \Vmwarephp\Factory\SoapMessage::makeUsingManagedObject($managedObject, $arguments));
 }
Ejemplo n.º 5
0
 /**
  * @return mixed
  * @throws Exception\Soap
  */
 public function getServiceContent()
 {
     if (!$this->serviceContent) {
         $this->serviceContent = $this->makeSoapCall('RetrieveServiceContent', SoapMessage::makeForServiceInstance());
     }
     return $this->serviceContent;
 }