public function testBuildElementRendersNothingIfViewDoesNotExist() { $element = $this->mockTextElement(); $element->shouldReceive('getView')->andReturn('non-existing'); $this->events->shouldReceive('fire')->twice(); $this->view->shouldReceive('exists')->once()->andReturn(true); $this->view->shouldReceive('make')->once()->andReturn(''); $this->assertSame('', $this->fb->buildElement($element)); }