Commit 6d04d2b8 authored by alexpott's avatar alexpott

Issue #2456983 by cilefen: Five methods in class TestFormBuilder are dead code. Remove them

parent 64332fe8
......@@ -353,24 +353,6 @@ public function testGetCache() {
$this->assertEmpty($form_state->getErrors());
}
/**
* Tests the sendResponse() method.
*
* @expectedException \Exception
*/
public function testSendResponse() {
$form_id = 'test_form_id';
$expected_form = $this->getMockBuilder('Symfony\Component\HttpFoundation\Response')
->disableOriginalConstructor()
->getMock();
$form_arg = $this->getMockForm($form_id, $expected_form);
// Do an initial build of the form and track the build ID.
$form_state = new FormState();
$this->formBuilder->buildForm($form_arg, $form_state);
}
/**
* Tests that HTML IDs are unique when rebuilding a form with errors.
*/
......
......@@ -256,16 +256,6 @@ protected function assertFormElement(array $expected_form, array $actual_form, $
* Provides a test form builder class.
*/
class TestFormBuilder extends FormBuilder {
protected static $seenIds = array();
/**
* {@inheritdoc}
*/
protected function sendResponse(Response $response) {
parent::sendResponse($response);
// Throw an exception instead of exiting.
throw new \Exception('exit');
}
/**
* @param \Drupal\Core\Session\AccountInterface $account
......@@ -300,41 +290,6 @@ protected function getElementInfo($type) {
}
return $types[$type];
}
/**
* {@inheritdoc}
*/
protected function drupalHtmlClass($class) {
return $class;
}
/**
* {@inheritdoc}
*/
protected function drupalHtmlId($id) {
if (isset(static::$seenIds[$id])) {
$id = $id . '--' . ++static::$seenIds[$id];
}
else {
static::$seenIds[$id] = 1;
}
return $id;
}
/**
* {@inheritdoc}
*/
public function drupalStaticReset($name = NULL) {
static::$seenIds = array();
}
/**
* {@inheritdoc}
*/
protected function requestUri() {
return '';
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment