mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-10 05:58:42 +00:00
test fixes
This commit is contained in:
parent
5cfa5f5a95
commit
634cc3d505
|
|
@ -291,7 +291,11 @@ final class StringUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
// @todo: this should not be necessary
|
// @todo: this should not be necessary
|
||||||
return \str_replace(['<ins></ins>', '<del></del>', '</ins><ins>', '</del><del>'], ['', '', '', ''], $result);
|
return \str_replace(
|
||||||
|
['</del></del>', '</ins></ins>', '<ins></ins>', '<del></del>', '</ins><ins>', '</del><del>', '</ins> <del>', '</del> <ins>'],
|
||||||
|
['', '', '', '', '', '', '</ins><del>', '</del><ins>'],
|
||||||
|
$result
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -274,12 +274,12 @@ class View extends ViewAbstract
|
||||||
|
|
||||||
$start = $start + \strlen($match);
|
$start = $start + \strlen($match);
|
||||||
if (\strlen($this->template) < $start) {
|
if (\strlen($this->template) < $start) {
|
||||||
throw new InvalidModuleException($this->template);
|
throw new InvalidThemeException($this->template);
|
||||||
}
|
}
|
||||||
|
|
||||||
$end = \strpos($this->template, '/', $start);
|
$end = \strpos($this->template, '/', $start);
|
||||||
if ($end === false) {
|
if ($end === false) {
|
||||||
throw new InvalidModuleException($this->template);
|
throw new InvalidThemeException($this->template);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->theme = \substr($this->template, $start, $end - $start);
|
$this->theme = \substr($this->template, $start, $end - $start);
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -66,7 +69,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -104,7 +110,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -131,7 +140,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -156,7 +168,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -181,7 +196,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -209,7 +227,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -235,7 +256,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -260,7 +284,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -286,7 +313,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -316,7 +346,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -346,7 +379,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -407,7 +443,10 @@ trait MailHandlerSmtpTrait
|
||||||
$smtp = new Smtp();
|
$smtp = new Smtp();
|
||||||
$this->handler->smtp = $smtp;
|
$this->handler->smtp = $smtp;
|
||||||
|
|
||||||
if ($this->handler->mailerTool !== '' && !\file_exists(\explode(' ', $this->handler->mailerTool)[0])) {
|
if ($this->handler->mailerTool !== ''
|
||||||
|
&& !\file_exists(\explode(' ', $this->handler->mailerTool)[0])
|
||||||
|
&& ($this->handler->smtp === null || !$this->handler->smtpConnect($this->handler->smtpOptions))
|
||||||
|
) {
|
||||||
self::markTestSkipped();
|
self::markTestSkipped();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ final class ArgumentTest extends \PHPUnit\Framework\TestCase
|
||||||
|
|
||||||
self::assertEquals('?para1=abc ?para2=2 #frag', $obj->getQuery());
|
self::assertEquals('?para1=abc ?para2=2 #frag', $obj->getQuery());
|
||||||
self::assertEquals(['?para1=abc', '?para2=2', '#frag'], $obj->getQueryArray());
|
self::assertEquals(['?para1=abc', '?para2=2', '#frag'], $obj->getQueryArray());
|
||||||
self::assertEquals('?para1=abc', $obj->getQuery('1'));
|
self::assertEquals('?para2=2', $obj->getQuery('1'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user