Skip to content

Commit a69b58e

Browse files
committed
chore: Add tests for new static file handling
1 parent 04b2e31 commit a69b58e

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

test/TlsIconTest.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,4 +536,43 @@ public function testStalwartTls()
536536
]
537537
], $headersProcessed);
538538
}
539+
540+
/**
541+
* @runInSeparateProcess
542+
*/
543+
public function testGetSvgPathPre17()
544+
{
545+
if (!defined('RCMAIL_VERSION')) {
546+
define('RCMAIL_VERSION', '1.6.9');
547+
}
548+
549+
$plugin = new tls_icon();
550+
$this->assertSame('plugins/tls_icon/lock.svg', $plugin->get_svg_path('lock.svg'));
551+
}
552+
553+
/**
554+
* @runInSeparateProcess
555+
*/
556+
public function testGetSvgPath17()
557+
{
558+
if (!defined('RCMAIL_VERSION')) {
559+
define('RCMAIL_VERSION', '1.7.0');
560+
}
561+
562+
$plugin = new tls_icon();
563+
$this->assertSame('static.php/plugins/tls_icon/lock.svg', $plugin->get_svg_path('lock.svg'));
564+
}
565+
566+
/**
567+
* @runInSeparateProcess
568+
*/
569+
public function testGetSvgPath17Git()
570+
{
571+
if (!defined('RCMAIL_VERSION')) {
572+
define('RCMAIL_VERSION', '1.7-git');
573+
}
574+
575+
$plugin = new tls_icon();
576+
$this->assertSame('static.php/plugins/tls_icon/lock.svg', $plugin->get_svg_path('lock.svg'));
577+
}
539578
}

0 commit comments

Comments
 (0)