/** * Tests the build method with a failed execution. * * @see \Drupal\views\Plugin\block\ViewsBlock::build() */ public function testBuildFailed() { $output = FALSE; $this->executable->expects($this->once())->method('buildRenderable')->with('block_1', [])->willReturn($output); $block_id = 'views_block:test_view-block_1'; $config = array(); $definition = array(); $definition['provider'] = 'views'; $plugin = new ViewsBlock($config, $block_id, $definition, $this->executableFactory, $this->storage, $this->account); $this->assertEquals(array(), $plugin->build()); }