Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
BackTest.php
Go to the documentation of this file.
1 <?php
7 
9 
13 class BackTest extends GenericTest
14 {
15  public function testGetButtonData()
16  {
17  $this->contextMock->expects($this->once())
18  ->method('getUrl')
19  ->with('*/*/', [])
20  ->willReturn('/');
21 
22  $this->assertEquals(
23  [
24  'label' => __('Back'),
25  'on_click' => sprintf("location.href = '%s';", '/'),
26  'class' => 'back',
27  'sort_order' => 10
28  ],
29  $this->getModel(Back::class)->getButtonData()
30  );
31  }
32 }
__()
Definition: __.php:13