15 $this->
getRequest()->setParam(
'block',
'tab_orders');
16 $this->dispatch(
'backend/admin/dashboard/ajaxBlock');
19 $this->assertContains(
'dashboard-diagram', $actual);
22 public function testTunnelAction()
24 $testUrl = \Magento\Backend\Block\Dashboard\Graph::API_URL .
'?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World';
26 curl_setopt(
$handle, CURLOPT_URL, $testUrl);
27 curl_setopt(
$handle, CURLOPT_RETURNTRANSFER,
true);
30 $this->markTestSkipped(
'Third-party service is unavailable: ' . $testUrl);
33 }
catch (\Exception $e) {
40 'chf' =>
'bg,s,f4f4f4|c,lg,90,ffffff,0.1,ededed,0',
41 'chm' =>
'B,f4d4b2,0,0,0',
43 'chd' =>
'e:AAAAAAAAf.AAAA',
45 'chxl' =>
'0:|10/13/12|10/14/12|10/15/12|10/16/12|10/17/12|10/18/12|10/19/12|1:|0|1|2',
47 'chg' =>
'16.666666666667,50,1,0',
49 $gaFixture = urlencode(base64_encode(json_encode($gaData)));
53 \
Magento\Backend\Helper\Dashboard\Data::class
55 $hash =
$helper->getChartDataHash($gaFixture);
56 $this->
getRequest()->setParam(
'ga', $gaFixture)->setParam(
'h', $hash);
57 $this->dispatch(
'backend/admin/dashboard/tunnel');
58 $this->assertStringStartsWith(
"\x89\x50\x4E\x47", $this->
getResponse()->getBody());
static getObjectManager()