Пример #1
0
 public function preCacheStreams(Report $report, $localCachePath, $format = 'HTML4.0')
 {
     $this->verifyCachePath($localCachePath);
     $rootPath = rtrim($localCachePath, '/');
     $streamIds = $this->getStreamIds();
     foreach ($streamIds as $streamId) {
         $path = $rootPath . '/' . $streamId;
         $stream = $report->renderStream($format, $streamId);
         $cachedResource = new CachedStreamResource($streamId, $path);
         $cachedResource->store($stream);
     }
     return $this;
 }
Пример #2
0
 public function testSetExecutionParametersAsClass()
 {
     $params = new \SSRS\Object\ExecutionParameters(array('page' => 1));
     $soapMock = $this->getMockFromWsdl(dirname(__FILE__) . '/ReportTest/ReportExecution2005.wsdl', 'SoapClientMockRender2');
     $soapMock->expects($this->once())->method('SetExecutionParameters')->with($this->equalTo(array('Parameters' => array(array('Name' => 'page', 'Value' => 1)), 'ParameterLanguage' => 'en-us')));
     $ssrs = new Report('http://test/ReportServer');
     $ssrs->setSoapExecution($soapMock)->setSessionId('test');
     $ssrs->setExecutionParameters($params);
 }