Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 52d3ff4

Browse files
committed
[FileInput] Remove duplicated tests
These tests scenarios are tested by testIsRequiredVsAllowEmptyVsContinueIfEmptyVsIsValid
1 parent 779b955 commit 52d3ff4

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

test/FileInputTest.php

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -111,48 +111,6 @@ public function testValidationOperatesBeforeFiltering()
111111
$this->assertEquals($badValue, $this->input->getValue());
112112
}
113113

114-
public function testGetMessagesReturnsValidationMessages()
115-
{
116-
$this->input->setAutoPrependUploadValidator(true);
117-
$this->input->setValue([
118-
'tmp_name' => __FILE__,
119-
'name' => 'foo',
120-
'size' => 1,
121-
'error' => 0,
122-
]);
123-
$this->assertFalse($this->input->isValid());
124-
$messages = $this->input->getMessages();
125-
$this->assertArrayHasKey(Validator\File\UploadFile::ATTACK, $messages);
126-
}
127-
128-
public function testCanValidateArrayOfMultiFileData()
129-
{
130-
$values = [
131-
[
132-
'tmp_name' => __FILE__,
133-
'name' => 'foo',
134-
],
135-
[
136-
'tmp_name' => __FILE__,
137-
'name' => 'bar',
138-
],
139-
[
140-
'tmp_name' => __FILE__,
141-
'name' => 'baz',
142-
],
143-
];
144-
$this->input->setValue($values);
145-
$this->input->setValidatorChain($this->createValidatorChainMock([
146-
[$values[0], null, true],
147-
[$values[1], null, true],
148-
[$values[2], null, true],
149-
]));
150-
$this->assertTrue(
151-
$this->input->isValid(),
152-
'isValid() value not match. Detail . ' . json_encode($this->input->getMessages())
153-
);
154-
}
155-
156114
public function testAutoPrependUploadValidatorIsOnByDefault()
157115
{
158116
$input = new FileInput('foo');

0 commit comments

Comments
 (0)