Skip to content

Commit

Permalink
! fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Spuds committed Jan 26, 2024
1 parent 7d29459 commit 1b38a20
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions tests/sources/subs/Attachment.subs.Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
*
*/

use PHPUnit\Framework\TestCase;
use ElkArte\Languages\Loader;
use ElkArte\Errors\AttachmentErrorContext;

class AttachmentSubs extends ElkArteCommonSetupTest
{
Expand Down Expand Up @@ -74,7 +75,7 @@ public function testProcessAttachments()

// Errors, we hope so
$errors = $attach_errors->prepareErrors();
$this->assertEquals('Error uploading attachments.',,$errors['attach_generic']['title']);
$this->assertEquals('Error uploading attachments.', $errors['attach_generic']['title']);
}

public function testGetAttachmentFromTopic()
Expand All @@ -85,20 +86,20 @@ public function testGetAttachmentFromTopic()

public function testGetUtlImageSize()
{
$result = url_image_size('https://www.elkarte.net/community/themes/default/images/logo.png)';
$this->assertEquals(145, $result[0]);
$result = url_image_size('https://www.elkarte.net/community/themes/default/images/logo.png');
$this->assertEquals(145, $result[0]);
}

public function testGetServerStoredAvatars()
{
global $context, $txt, $modSettings;

$modSettings['avatar_directory'] = '/var/www/avatars';
$modSettings['avatar_directory'] = '/home/runner/work/Elkarte/Elkarte/elkarte//avatars';
$context['member']['avatar']['server_pic'] = 'blank.png';
$txt['no_pic'] = 'None';

$result = getServerStoredAvatars( '/Oxygen');

var_dump($result);
$this->assertEquals('beaker.png', $result[0]['files'][0]['filename']);
}
}

0 comments on commit 1b38a20

Please sign in to comment.