Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

! rename test #3739

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,21 @@ 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');

$this->assertEquals('beaker.png', $result[0]['files'][0]['filename']);
$this->assertCount(22, $result[0]['files']);
//$this->assertEquals('invisible-user.png', $result[0]['files'][0]['filename']);
}
}
Loading