mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +00:00
more test fixes
This commit is contained in:
parent
384b784995
commit
8c2ea75430
|
|
@ -158,7 +158,9 @@ final class ModuleManager
|
||||||
$query = new Builder($this->app->dbPool->get('select'));
|
$query = new Builder($this->app->dbPool->get('select'));
|
||||||
$sth = $query->select('module_load.module_load_type', 'module_load.*')
|
$sth = $query->select('module_load.module_load_type', 'module_load.*')
|
||||||
->from('module_load')
|
->from('module_load')
|
||||||
->innerJoin('module')->on('module_load.module_load_from', '=', 'module.module_id')->orOn('module_load.module_load_for', '=', 'module.module_id')
|
->innerJoin('module')
|
||||||
|
->on('module_load.module_load_from', '=', 'module.module_id')
|
||||||
|
->orOn('module_load.module_load_for', '=', 'module.module_id')
|
||||||
->whereIn('module_load.module_load_pid', $uriHash)
|
->whereIn('module_load.module_load_pid', $uriHash)
|
||||||
->andWhere('module.module_status', '=', ModuleStatus::ACTIVE)
|
->andWhere('module.module_status', '=', ModuleStatus::ACTIVE)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
"name": ".+",
|
"name": ".+",
|
||||||
"website": ".*"
|
"website": ".*"
|
||||||
},
|
},
|
||||||
"description": ".+",
|
|
||||||
"directory": "[a-zA-Z0-9]+",
|
"directory": "[a-zA-Z0-9]+",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
".*": ".*"
|
".*": ".*"
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ class File extends FileAbstract implements FileInterface
|
||||||
|| (!$exists && ContentPutMode::hasFlag($mode, ContentPutMode::CREATE))
|
|| (!$exists && ContentPutMode::hasFlag($mode, ContentPutMode::CREATE))
|
||||||
) {
|
) {
|
||||||
if (ContentPutMode::hasFlag($mode, ContentPutMode::APPEND) && $exists) {
|
if (ContentPutMode::hasFlag($mode, ContentPutMode::APPEND) && $exists) {
|
||||||
$content .= self::get($con, $path);
|
$content = self::get($con, $path) . $content;
|
||||||
} elseif (ContentPutMode::hasFlag($mode, ContentPutMode::PREPEND) && $exists) {
|
} elseif (ContentPutMode::hasFlag($mode, ContentPutMode::PREPEND) && $exists) {
|
||||||
$content .= self::get($con, $path);
|
$content .= self::get($con, $path);
|
||||||
} elseif (!Directory::exists($con, \dirname($path))) {
|
} elseif (!Directory::exists($con, \dirname($path))) {
|
||||||
|
|
|
||||||
|
|
@ -273,7 +273,6 @@ class Markdown
|
||||||
'_' => ['Rule'],
|
'_' => ['Rule'],
|
||||||
'`' => ['FencedCode'],
|
'`' => ['FencedCode'],
|
||||||
'|' => ['Table'],
|
'|' => ['Table'],
|
||||||
'~' => ['FencedCode'],
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -895,7 +894,7 @@ class Markdown
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle striketrhough
|
* Handle strikethrough
|
||||||
*
|
*
|
||||||
* @param array{text:string, context:string, before:string} $excerpt Inline data
|
* @param array{text:string, context:string, before:string} $excerpt Inline data
|
||||||
*
|
*
|
||||||
|
|
@ -2049,7 +2048,7 @@ class Markdown
|
||||||
$markerWithoutWhitespace = $matches[1];
|
$markerWithoutWhitespace = $matches[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($name === 'ul') {
|
if ($name !== 'ul') {
|
||||||
$markerWithoutWhitespace = \substr($markerWithoutWhitespace, -1);
|
$markerWithoutWhitespace = \substr($markerWithoutWhitespace, -1);
|
||||||
|
|
||||||
if ($markerWithoutWhitespace === false) {
|
if ($markerWithoutWhitespace === false) {
|
||||||
|
|
@ -2081,7 +2080,7 @@ class Markdown
|
||||||
|
|
||||||
$listStart = \ltrim($tmp, '0') ?: '0';
|
$listStart = \ltrim($tmp, '0') ?: '0';
|
||||||
|
|
||||||
if ($listStart !== '1') {
|
if ($listStart !== '0') {
|
||||||
if (isset($current)
|
if (isset($current)
|
||||||
&& $current['type'] === 'Paragraph'
|
&& $current['type'] === 'Paragraph'
|
||||||
&& !isset($current['interrupted'])
|
&& !isset($current['interrupted'])
|
||||||
|
|
@ -4150,7 +4149,7 @@ class Markdown
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$requiredIndent = ($block['indent'] + \strlen($block['data']['marker']));
|
$requiredIndent = $block['indent'] + \strlen($block['data']['marker']);
|
||||||
|
|
||||||
if ($line['indent'] < $requiredIndent
|
if ($line['indent'] < $requiredIndent
|
||||||
&& (($block['data']['type'] === 'ol'
|
&& (($block['data']['type'] === 'ol'
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,8 @@ final class FileTest extends \PHPUnit\Framework\TestCase
|
||||||
\ftp_delete(self::$con, __DIR__ . '/0x00');
|
\ftp_delete(self::$con, __DIR__ . '/0x00');
|
||||||
|
|
||||||
if (!$mkdir || !$put) {
|
if (!$mkdir || !$put) {
|
||||||
|
self::$con = null;
|
||||||
|
|
||||||
throw new \Exception();
|
throw new \Exception();
|
||||||
}
|
}
|
||||||
} catch (\Throwable $_) {
|
} catch (\Throwable $_) {
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,10 @@ final class ImageUtilsTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertTrue(\is_file(__DIR__ . '/img/logo_resized.png'));
|
self::assertTrue(\is_file(__DIR__ . '/img/logo_resized.png'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers phpOMS\Utils\ImageUtils
|
||||||
|
* @group slow
|
||||||
|
*/
|
||||||
public function testDifference() : void
|
public function testDifference() : void
|
||||||
{
|
{
|
||||||
foreach (['png', 'gif'] as $type) {
|
foreach (['png', 'gif'] as $type) {
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,4 @@
|
||||||
|
|
||||||
$message = 'fenced code block';
|
$message = 'fenced code block';
|
||||||
echo $message;</code></pre>
|
echo $message;</code></pre>
|
||||||
<pre><code>tilde</code></pre>
|
|
||||||
<pre><code class="language-php">echo 'language identifier';</code></pre>
|
<pre><code class="language-php">echo 'language identifier';</code></pre>
|
||||||
|
|
@ -5,10 +5,6 @@ $message = 'fenced code block';
|
||||||
echo $message;
|
echo $message;
|
||||||
```
|
```
|
||||||
|
|
||||||
~~~
|
|
||||||
tilde
|
|
||||||
~~~
|
|
||||||
|
|
||||||
```php
|
```php
|
||||||
echo 'language identifier';
|
echo 'language identifier';
|
||||||
```
|
```
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
<ol>
|
<ol start="1">
|
||||||
<li>one</li>
|
<li>one</li>
|
||||||
<li>two</li>
|
<li>two</li>
|
||||||
</ol>
|
</ol>
|
||||||
<p>repeating numbers:</p>
|
<p>repeating numbers:</p>
|
||||||
<ol>
|
<ol start="1">
|
||||||
<li>one</li>
|
<li>one</li>
|
||||||
<li>two</li>
|
<li>two</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user