Skip to content

Commit a18a66e

Browse files
committed
Minor style fix and correction to reported test coverage in README.md
1 parent 2fdcee4 commit a18a66e

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Features:
2626
* Uses the flexible [KnpMenu Library](https://github.com/KnpLabs/KnpMenu) to generate menus
2727
* [PSR-12](https://www.php-fig.org/psr/psr-12/) compliant
2828
* Composer-compatible
29-
* Unit-tested (100% coverage)
29+
* Unit-tested (97% coverage)
3030

3131
In the spirit of [KISS philosophy](http://en.wikipedia.org/wiki/KISS_principle), this library makes a few assumptions:
3232

tests/TocGeneratorTest.php

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -155,22 +155,18 @@ public function unusedHeadingLevelsAreTrimmedDataProvider(): iterable
155155
{
156156
$obj = new TocGenerator();
157157

158-
yield [
159-
$obj->getMenu(
160-
"<h3 id='a'>A-Header</h3><h4 id='y'>Y-Header</h4><h4 id='z'>Z-Header</h4><h3 id='x'>X-Header</h3>",
161-
1,
162-
6
163-
), 2, 2
164-
];
165-
166-
yield [$obj->getMenu("<h1 id='x'>X-Header</h1>", 1, 6), 1];
167-
168-
yield [
169-
$obj->getMenu('<h5 id="x">X-Header</h5><h5 id="y">Y-Header</h5>', 1, 6), 2
170-
];
171-
172-
yield [
173-
$obj->getMenu('<h6 id="y">Y-Header</h6>', 1, 5), 0
158+
return [
159+
[
160+
$obj->getMenu(
161+
"<h3 id='a'>A-Header</h3><h4 id='y'>Y-Header</h4><h4 id='z'>Z-Header</h4><h3 id='x'>X-Header</h3>",
162+
1,
163+
6
164+
), 2, 2
165+
],
166+
[$obj->getMenu("<h1 id='x'>X-Header</h1>", 1, 6), 1],
167+
[$obj->getMenu('<h5 id="x">X-Header</h5><h5 id="y">Y-Header</h5>', 1, 6), 2],
168+
[$obj->getMenu('<h6 id="y">Y-Header</h6>', 1, 5), 0],
169+
[$obj->getMenu("<h1 /><h2 id='x'>X-Header</h2>", 1, 6), 1, 0]
174170
];
175171
}
176172
}

0 commit comments

Comments
 (0)