Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ScheduledTest.php
Go to the documentation of this file.
1 <?php
7 
8 class ScheduledTest extends \PHPUnit\Framework\TestCase
9 {
16  public function testRender($rowValue, $class, $text)
17  {
18  $html = '<span class="' . $class . '"><span>' . $text . '</span></span>';
19  $row = new \Magento\Framework\DataObject();
20  $column = new \Magento\Framework\DataObject();
21  $context = $this->getMockBuilder(\Magento\Backend\Block\Context::class)
22  ->disableOriginalConstructor()
23  ->getMock();
24 
25  $model = new \Magento\Indexer\Block\Backend\Grid\Column\Renderer\Scheduled($context);
26  $column->setGetter('getValue');
27  $row->setValue($rowValue);
28  $model->setColumn($column);
29 
30  $result = $model->render($row);
31  $this->assertEquals($result, $html);
32  }
33 
37  public function typeProvider()
38  {
39  return [
40  [true, 'grid-severity-notice', __('Update by Schedule')],
41  [false, 'grid-severity-major', __('Update on Save')],
42  ['', 'grid-severity-major', __('Update on Save')],
43  ];
44  }
45 }
__()
Definition: __.php:13
endifif( $block->getLastPageNum()>1)( 'Page') ?></strong >< ul class $text
Definition: pager.phtml:43
$_option $_optionId $class
Definition: date.phtml:13