aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functional/fileupload_form_test.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-02-09 23:47:20 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-02-09 23:47:20 +0100
commit07f19647f43f44c3b82d6100f384dff5800eb550 (patch)
tree17cd9d1ce25d8c70d086483ab864104f09181824 /tests/functional/fileupload_form_test.php
parentff57ecf0bc541123c987ff0a84e80e1d01eb31de (diff)
downloadforums-07f19647f43f44c3b82d6100f384dff5800eb550.tar
forums-07f19647f43f44c3b82d6100f384dff5800eb550.tar.gz
forums-07f19647f43f44c3b82d6100f384dff5800eb550.tar.bz2
forums-07f19647f43f44c3b82d6100f384dff5800eb550.tar.xz
forums-07f19647f43f44c3b82d6100f384dff5800eb550.zip
[ticket/12175] Fix test for uploading a valid file
PHPBB3-12175
Diffstat (limited to 'tests/functional/fileupload_form_test.php')
-rw-r--r--tests/functional/fileupload_form_test.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/functional/fileupload_form_test.php b/tests/functional/fileupload_form_test.php
index 596aae03a2..db615dc2a6 100644
--- a/tests/functional/fileupload_form_test.php
+++ b/tests/functional/fileupload_form_test.php
@@ -82,10 +82,12 @@ class phpbb_functional_fileupload_form_test extends phpbb_functional_test_case
public function test_valid_file()
{
- $this->markTestIncomplete('Test fails intermittently.');
$crawler = $this->upload_file('valid.jpg', 'image/jpeg');
- // ensure there was no error message rendered
+
+ // Ensure there was no error message rendered
$this->assertNotContains('<h2>' . $this->lang('INFORMATION') . '</h2>', $this->get_content());
- $this->assertContains($this->lang('POSTED_ATTACHMENTS'), $crawler->filter('#postform h3')->eq(1)->text());
+
+ // Also the file name should be in the first row of the files table
+ $this->assertEquals('valid.jpg', $crawler->filter('span.file-name')->eq(1)->text());
}
}