more test fixes

This commit is contained in:
Dennis Eichhorn 2024-03-17 21:33:48 +00:00
parent 384b784995
commit 8c2ea75430
9 changed files with 16 additions and 15 deletions

View File

@ -158,7 +158,9 @@ final class ModuleManager
$query = new Builder($this->app->dbPool->get('select'));
$sth = $query->select('module_load.module_load_type', '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)
->andWhere('module.module_status', '=', ModuleStatus::ACTIVE)
->execute();

View File

@ -13,7 +13,6 @@
"name": ".+",
"website": ".*"
},
"description": ".+",
"directory": "[a-zA-Z0-9]+",
"dependencies": {
".*": ".*"

View File

@ -137,7 +137,7 @@ class File extends FileAbstract implements FileInterface
|| (!$exists && ContentPutMode::hasFlag($mode, ContentPutMode::CREATE))
) {
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) {
$content .= self::get($con, $path);
} elseif (!Directory::exists($con, \dirname($path))) {

View File

@ -273,7 +273,6 @@ class Markdown
'_' => ['Rule'],
'`' => ['FencedCode'],
'|' => ['Table'],
'~' => ['FencedCode'],
];
/**
@ -895,7 +894,7 @@ class Markdown
}
/**
* Handle striketrhough
* Handle strikethrough
*
* @param array{text:string, context:string, before:string} $excerpt Inline data
*
@ -2049,7 +2048,7 @@ class Markdown
$markerWithoutWhitespace = $matches[1];
}
if ($name === 'ul') {
if ($name !== 'ul') {
$markerWithoutWhitespace = \substr($markerWithoutWhitespace, -1);
if ($markerWithoutWhitespace === false) {
@ -2081,7 +2080,7 @@ class Markdown
$listStart = \ltrim($tmp, '0') ?: '0';
if ($listStart !== '1') {
if ($listStart !== '0') {
if (isset($current)
&& $current['type'] === 'Paragraph'
&& !isset($current['interrupted'])
@ -4150,7 +4149,7 @@ class Markdown
return null;
}
$requiredIndent = ($block['indent'] + \strlen($block['data']['marker']));
$requiredIndent = $block['indent'] + \strlen($block['data']['marker']);
if ($line['indent'] < $requiredIndent
&& (($block['data']['type'] === 'ol'

View File

@ -54,6 +54,8 @@ final class FileTest extends \PHPUnit\Framework\TestCase
\ftp_delete(self::$con, __DIR__ . '/0x00');
if (!$mkdir || !$put) {
self::$con = null;
throw new \Exception();
}
} catch (\Throwable $_) {

View File

@ -43,6 +43,10 @@ final class ImageUtilsTest extends \PHPUnit\Framework\TestCase
self::assertTrue(\is_file(__DIR__ . '/img/logo_resized.png'));
}
/**
* @covers phpOMS\Utils\ImageUtils
* @group slow
*/
public function testDifference() : void
{
foreach (['png', 'gif'] as $type) {

View File

@ -2,5 +2,4 @@
$message = 'fenced code block';
echo $message;</code></pre>
<pre><code>tilde</code></pre>
<pre><code class="language-php">echo 'language identifier';</code></pre>

View File

@ -5,10 +5,6 @@ $message = 'fenced code block';
echo $message;
```
~~~
tilde
~~~
```php
echo 'language identifier';
```

View File

@ -1,9 +1,9 @@
<ol>
<ol start="1">
<li>one</li>
<li>two</li>
</ol>
<p>repeating numbers:</p>
<ol>
<ol start="1">
<li>one</li>
<li>two</li>
</ol>