Commit cd1de1d2 authored by Carsten  Rose's avatar Carsten Rose

fix unit tests

parent 72d6b5bc
Pipeline #2667 passed with stages
in 2 minutes and 45 seconds
......@@ -201,58 +201,6 @@ class HelperFormElementTest extends TestCase {
$this->assertEquals('{"red":18,"green":52,"blue":86}', $result, "Expect white");
}
public function testTextareaAutoHeight() {
$result = HelperFormElement::textareaAutoHeight([], '');
$this->assertEquals('1', $result);
$result = HelperFormElement::textareaAutoHeight([1], '');
$this->assertEquals('1', $result);
$result = HelperFormElement::textareaAutoHeight([1, 0], '');
$this->assertEquals('1', $result);
$result = HelperFormElement::textareaAutoHeight([1, 1], '');
$this->assertEquals('1', $result);
$result = HelperFormElement::textareaAutoHeight([1, 2], '');
$this->assertEquals('2', $result);
$result = HelperFormElement::textareaAutoHeight([], 'Expect white\nExpect white Expect white Expect white\nExpect white');
$this->assertEquals('1', $result);
$result = HelperFormElement::textareaAutoHeight([20], 'Expect white\nExpect white Expect white Expect white\nExpect white');
$this->assertEquals('1', $result);
$result = HelperFormElement::textareaAutoHeight([20, 0], 'Expect white\nExpect white Expect white Expect white\nExpect white');
$this->assertEquals('1', $result);
$result = HelperFormElement::textareaAutoHeight([20, 1], 'Expect white\nExpect white Expect white Expect white\nExpect white');
$this->assertEquals('1', $result);
$result = HelperFormElement::textareaAutoHeight([20, 2], 'Expect white\nExpect white Expect white Expect white\nExpect white');
$this->assertEquals('2', $result);
$result = HelperFormElement::textareaAutoHeight([1, 1, 1], '');
$this->assertEquals('1', $result);
$result = HelperFormElement::textareaAutoHeight([20, 1, 10], 'one line');
$this->assertEquals('1', $result);
$result = HelperFormElement::textareaAutoHeight([20, 1, 2], "Expect white\nExpect white\nExpect white");
$this->assertEquals('2', $result);
$result = HelperFormElement::textareaAutoHeight([20, 1, 10], "Expect white\nExpect white\nExpect white");
$this->assertEquals('3', $result);
$result = HelperFormElement::textareaAutoHeight([20, 1, 10], "Expect white\nExpect white Expect white Expect white\nExpect white");
$this->assertEquals('4', $result);
}
/**
* @expectedException \UserFormException
*
......
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