Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 703429b

Browse files
committed
up: update some for string convert and pipe tests
1 parent 288daa7 commit 703429b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

‎.github/workflows/php.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ jobs:
3939
# Docs: https://getcomposer.org/doc/articles/scripts.md
4040

4141
- name: Run test suite
42-
run: phpunit --debug
42+
run: phpunit

‎src/Str/Traits/StringConvertTrait.php‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,11 @@ public static function splitKvMap(string $text, string $lineSep = "\n", string $
505505
continue;
506506
}
507507

508+
// skip comments and must be contains $valSep
509+
if ($line[0] === '#' || !str_contains($line, $valSep)) {
510+
continue;
511+
}
512+
508513
[$k, $v] = self::split2node($line, $valSep);
509514
$map[$k] = $v;
510515
}

‎test/Std/PipeFiltersTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testApplyStringRules(): void
4141

4242
$pf = PipeFilters::newWithDefaultFilters();
4343
foreach ($tests as [$wanted, $value, $rules]) {
44-
$this->assertEquals($wanted, $pf->applyStringRules($value, $rules));
44+
$this->assertEquals($wanted, $pf->applyString($value, $rules));
4545
}
4646
}
4747
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /