public function testLoadChildrenCheckRecursiveParameterIsSetAndIsBoolean() { $soapMock = $this->getMockFromWsdl(dirname(__FILE__) . '/ReportTest/ReportService2010.wsdl', 'SoapClientMockChildren2'); $recursiveParam = true; $soapMock->expects($this->any())->method('ListChildren')->with($this->equalTo(array('ItemPath' => '/Reports', 'Recursive' => true))); $ssrs = new SSRS_Report('http://test/ReportServer'); $ssrs->setSoapService($soapMock); $result = $ssrs->listChildren('/Reports', $recursiveParam); }
<?php require dirname(__FILE__) . '/../library/SSRS/Report.php'; $options = array('username' => 'testing', 'password' => 'password'); $ssrs = new SSRS_Report('http://localhost/reportserver/', $options); $result = $ssrs->listChildren('/Reports', true); foreach ($result->CatalogItems as $item) { echo $item->Name . ': ' . $item->Path . PHP_EOL; }