function ArgumentDateTest::testMonthHandler
Tests the Month handler.
See also
\Drupal\node\Plugin\views\argument\CreatedMonth
File
- 
              core/
modules/ views/ tests/ src/ Kernel/ Handler/ ArgumentDateTest.php, line 122  
Class
- ArgumentDateTest
 - Tests the core date argument handlers.
 
Namespace
Drupal\Tests\views\Kernel\HandlerCode
public function testMonthHandler() : void {
  $view = Views::getView('test_argument_date');
  $view->setDisplay('embed_2');
  $this->executeView($view, [
    '01',
  ]);
  $expected = [];
  $expected[] = [
    'id' => 1,
  ];
  $expected[] = [
    'id' => 2,
  ];
  $expected[] = [
    'id' => 3,
  ];
  $expected[] = [
    'id' => 4,
  ];
  $expected[] = [
    'id' => 5,
  ];
  $this->assertIdenticalResultset($view, $expected, $this->columnMap);
  $view->destroy();
  $view->setDisplay('embed_2');
  $this->executeView($view, [
    '12',
  ]);
  $expected = [];
  $this->assertIdenticalResultset($view, $expected, $this->columnMap);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.