diff options
author | Fyorl <gaelreth@gmail.com> | 2012-07-08 00:46:09 +0100 |
---|---|---|
committer | Fyorl <gaelreth@gmail.com> | 2012-07-09 14:08:19 +0100 |
commit | a4717ef525969427aac77eb077f28ee2d587126c (patch) | |
tree | 8d09b7dd8b75b7c9438fba2e70b06658fed35c33 /tests/functional | |
parent | 682757c1cb1b7d7c8e438de374a790049a11164e (diff) | |
download | forums-a4717ef525969427aac77eb077f28ee2d587126c.tar forums-a4717ef525969427aac77eb077f28ee2d587126c.tar.gz forums-a4717ef525969427aac77eb077f28ee2d587126c.tar.bz2 forums-a4717ef525969427aac77eb077f28ee2d587126c.tar.xz forums-a4717ef525969427aac77eb077f28ee2d587126c.zip |
[ticket/10941] Removed the incomplete mark as is_image is fixed
Had to remove one of the tests due to a small limitation with the
functional testing framework. May mark the test as incomplete again
pending further comments.
PHPBB3-10941
Diffstat (limited to 'tests/functional')
-rw-r--r-- | tests/functional/fileupload_test.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tests/functional/fileupload_test.php b/tests/functional/fileupload_test.php index 44bb22da8f..2abf81c457 100644 --- a/tests/functional/fileupload_test.php +++ b/tests/functional/fileupload_test.php @@ -14,13 +14,6 @@ class phpbb_functional_fileupload_test extends phpbb_functional_test_case { public function test_form_upload() { - // This test is marked as incomplete due to an apparent bug in the - // symfony framework which causes it to lose the mimetype of any file - // uploaded. Since filespec::is_image() relies on the mimetype, all - // image uploads fail. filespec::is_image() is fixed in: - // https://github.com/phpbb/phpbb3/pull/833 - $this->markTestIncomplete(); - $path = __DIR__ . '/fixtures/files/'; $this->add_lang('posting'); $this->login(); @@ -30,21 +23,23 @@ class phpbb_functional_fileupload_test extends phpbb_functional_test_case $form = $crawler->selectButton('add_file')->form(); $form['fileupload']->upload($path . 'illegal-extension.bif'); $crawler = $this->client->submit($form); - $this->assertEquals(1, $crawler->filter('p.error')->count()); + $this->assertEquals('The extension bif is not allowed.', $crawler->filter('p.error')->text()); // Test 2: Empty file $crawler = $this->request('GET', 'posting.php?mode=reply&f=2&t=1&sid=' . $this->sid); $form = $crawler->selectButton('add_file')->form(); $form['fileupload']->upload($path . 'empty.png'); $crawler = $this->client->submit($form); - $this->assertEquals(1, $crawler->filter('p.error')->count()); + $this->assertEquals('The image file you tried to attach is invalid.', $crawler->filter('div#message p')->text()); // Test 3: File too large - $crawler = $this->request('GET', 'posting.php?mode=reply&f=2&t=1&sid=' . $this->sid); + // Cannot be tested by an admin account which this functional framework + // provides + /*$crawler = $this->request('GET', 'posting.php?mode=reply&f=2&t=1&sid=' . $this->sid); $form = $crawler->selectButton('add_file')->form(); $form['fileupload']->upload($path . 'too-large.png'); $crawler = $this->client->submit($form); - $this->assertEquals(1, $crawler->filter('div#message')->count()); + $this->assertEquals(1, $crawler->filter('div#message')->count());*/ // Test 4: Valid file $crawler = $this->request('GET', 'posting.php?mode=reply&f=2&t=1&sid=' . $this->sid); |