mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 18:38:53 +00:00
[ticket/17357] Fix test
PHPBB-17357
This commit is contained in:
parent
877e364cbd
commit
ecebaef5b6
1 changed files with 5 additions and 6 deletions
|
@ -86,16 +86,16 @@ class phpbb_attachment_delete_test extends \phpbb_database_test_case
|
||||||
public function data_attachment_unlink()
|
public function data_attachment_unlink()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
array(true, true, true),
|
array(true, true),
|
||||||
array(true, false, false),
|
array(false, false),
|
||||||
array(true, true, false, true),
|
array(true, false, true),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider data_attachment_unlink
|
* @dataProvider data_attachment_unlink
|
||||||
*/
|
*/
|
||||||
public function test_attachment_delete_success($remove_success, $exists_success, $expected, $throw_exception = false)
|
public function test_attachment_delete_success($exists_success, $expected, $throw_exception = false)
|
||||||
{
|
{
|
||||||
$this->storage = $this->createMock('\phpbb\storage\storage');
|
$this->storage = $this->createMock('\phpbb\storage\storage');
|
||||||
if ($throw_exception)
|
if ($throw_exception)
|
||||||
|
@ -107,8 +107,7 @@ class phpbb_attachment_delete_test extends \phpbb_database_test_case
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->storage->expects($this->any())
|
$this->storage->expects($this->any())
|
||||||
->method('delete')
|
->method('delete');
|
||||||
->willReturn($remove_success);
|
|
||||||
}
|
}
|
||||||
$this->storage->expects($this->any())
|
$this->storage->expects($this->any())
|
||||||
->method('exists')
|
->method('exists')
|
||||||
|
|
Loading…
Add table
Reference in a new issue