| Code Coverage | ||||||||||
| Classes and Traits | Functions and Methods | Lines | ||||||||
| Total |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 4 | CRAP |  | 0.00% | 0 / 8 | 
| StubForm |  | 0.00% | 0 / 1 |  | 0.00% | 0 / 4 | 20 |  | 0.00% | 0 / 8 | 
| __construct |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 3 | |||
| getFormId |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 2 | |||
| buildForm |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 2 | |||
| submitForm |  | 0.00% | 0 / 1 | 2 |  | 0.00% | 0 / 1 | |||
| <?php | |
| /** | |
| * @file | |
| * Contains \Drupal\system\Tests\Form\StubForm. | |
| */ | |
| namespace Drupal\system\Tests\Form; | |
| use Drupal\Core\Form\FormBase; | |
| use Drupal\Core\Form\FormStateInterface; | |
| /** | |
| * Provides a stub form for testing purposes. | |
| */ | |
| class StubForm extends FormBase { | |
| /** | |
| * The form array. | |
| * | |
| * @var array | |
| */ | |
| protected $form; | |
| /** | |
| * The form ID. | |
| * | |
| * @var string | |
| */ | |
| protected $formId; | |
| /** | |
| * Constructs a StubForm. | |
| * | |
| * @param string $form_id | |
| * The form ID. | |
| * @param array $form | |
| * The form array. | |
| */ | |
| public function __construct($form_id, $form) { | |
| $this->formId = $form_id; | |
| $this->form = $form; | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function getFormId() { | |
| $this->formId; | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function buildForm(array $form, FormStateInterface $form_state) { | |
| return $this->form; | |
| } | |
| /** | |
| * {@inheritdoc} | |
| */ | |
| public function submitForm(array &$form, FormStateInterface $form_state) { | |
| } | |
| } |