function getServiceContent() { if (!$this->serviceContent) { $this->serviceContent = $this->makeSoapCall('RetrieveServiceContent', \Vmwarephp\Factory\SoapMessage::makeForServiceInstance()); } return $this->serviceContent; }
function getServiceContent() { require_once 'TypeDefinitions.inc'; if (!$this->serviceContent) { $this->serviceContent = $this->makeSoapCall('RetrieveServiceContent', \Vmwarephp\Factory\SoapMessage::makeForServiceInstance()); } return $this->serviceContent; }
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))); }
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)); }
/** * @return mixed * @throws Exception\Soap */ public function getServiceContent() { if (!$this->serviceContent) { $this->serviceContent = $this->makeSoapCall('RetrieveServiceContent', SoapMessage::makeForServiceInstance()); } return $this->serviceContent; }