当前位置: 首页>>代码示例>>PHP>>正文


PHP Fixture::canImagesBeIncludedInScheduledReports方法代码示例

本文整理汇总了PHP中Piwik\Tests\Framework\Fixture::canImagesBeIncludedInScheduledReports方法的典型用法代码示例。如果您正苦于以下问题:PHP Fixture::canImagesBeIncludedInScheduledReports方法的具体用法?PHP Fixture::canImagesBeIncludedInScheduledReports怎么用?PHP Fixture::canImagesBeIncludedInScheduledReports使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Piwik\Tests\Framework\Fixture的用法示例。


在下文中一共展示了Fixture::canImagesBeIncludedInScheduledReports方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getApiForTestingScheduledReports

 /**
  * Return 4 Api Urls for testing scheduled reports :
  * - one in HTML format with all available reports
  * - one in PDF format with all available reports
  * - two in SMS (one for each available report: MultiSites.getOne & MultiSites.getAll)
  *
  * @param string $dateTime eg '2010-01-01 12:34:56'
  * @param string $period eg 'day', 'week', 'month', 'year'
  * @return array
  */
 protected static function getApiForTestingScheduledReports($dateTime, $period)
 {
     $apiCalls = array();
     // HTML Scheduled Report
     array_push($apiCalls, array('ScheduledReports.generateReport', array('testSuffix' => '_scheduled_report_in_html_tables_only', 'date' => $dateTime, 'periods' => array($period), 'format' => 'original', 'fileExtension' => 'html', 'otherRequestParameters' => array('idReport' => 1, 'reportFormat' => ReportRenderer::HTML_FORMAT, 'outputType' => \Piwik\Plugins\ScheduledReports\API::OUTPUT_RETURN))));
     // CSV Scheduled Report
     array_push($apiCalls, array('ScheduledReports.generateReport', array('testSuffix' => '_scheduled_report_in_csv', 'date' => $dateTime, 'periods' => array($period), 'format' => 'original', 'fileExtension' => 'csv', 'otherRequestParameters' => array('idReport' => 1, 'reportFormat' => ReportRenderer::CSV_FORMAT, 'outputType' => \Piwik\Plugins\ScheduledReports\API::OUTPUT_RETURN))));
     if (Fixture::canImagesBeIncludedInScheduledReports()) {
         // PDF Scheduled Report
         // tests/PHPUnit/System/processed/test_ecommerceOrderWithItems_scheduled_report_in_pdf_tables_only__ScheduledReports.generateReport_week.original.pdf
         array_push($apiCalls, array('ScheduledReports.generateReport', array('testSuffix' => '_scheduled_report_in_pdf_tables_only', 'date' => $dateTime, 'periods' => array($period), 'format' => 'original', 'fileExtension' => 'pdf', 'otherRequestParameters' => array('idReport' => 1, 'reportFormat' => ReportRenderer::PDF_FORMAT, 'outputType' => \Piwik\Plugins\ScheduledReports\API::OUTPUT_RETURN))));
     }
     // SMS Scheduled Report, one site
     array_push($apiCalls, array('ScheduledReports.generateReport', array('testSuffix' => '_scheduled_report_via_sms_one_site', 'date' => $dateTime, 'periods' => array($period), 'format' => 'original', 'fileExtension' => 'sms.txt', 'otherRequestParameters' => array('idReport' => 2, 'outputType' => \Piwik\Plugins\ScheduledReports\API::OUTPUT_RETURN))));
     // SMS Scheduled Report, all sites
     array_push($apiCalls, array('ScheduledReports.generateReport', array('testSuffix' => '_scheduled_report_via_sms_all_sites', 'date' => $dateTime, 'periods' => array($period), 'format' => 'original', 'fileExtension' => 'sms.txt', 'otherRequestParameters' => array('idReport' => 3, 'outputType' => \Piwik\Plugins\ScheduledReports\API::OUTPUT_RETURN))));
     if (Fixture::canImagesBeIncludedInScheduledReports()) {
         // HTML Scheduled Report with images
         array_push($apiCalls, array('ScheduledReports.generateReport', array('testSuffix' => '_scheduled_report_in_html_tables_and_graph', 'date' => $dateTime, 'periods' => array($period), 'format' => 'original', 'fileExtension' => 'html', 'otherRequestParameters' => array('idReport' => 4, 'reportFormat' => ReportRenderer::HTML_FORMAT, 'outputType' => \Piwik\Plugins\ScheduledReports\API::OUTPUT_RETURN))));
         // mail report with one row evolution based png graph
         array_push($apiCalls, array('ScheduledReports.generateReport', array('testSuffix' => '_scheduled_report_in_html_row_evolution_graph', 'date' => $dateTime, 'periods' => array($period), 'format' => 'original', 'fileExtension' => 'html', 'otherRequestParameters' => array('idReport' => 5, 'outputType' => \Piwik\Plugins\ScheduledReports\API::OUTPUT_RETURN))));
     }
     return $apiCalls;
 }
开发者ID:mgou-net,项目名称:piwik,代码行数:34,代码来源:SystemTestCase.php


注:本文中的Piwik\Tests\Framework\Fixture::canImagesBeIncludedInScheduledReports方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。