-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(documentator)!: Location detection/update for links with inline n…
…odes inside label (#182)
- Loading branch information
Showing
20 changed files
with
396 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
packages/documentator/src/Markdown/Location/LocationTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace LastDragon_ru\LaraASP\Documentator\Markdown\Location; | ||
|
||
use LastDragon_ru\LaraASP\Documentator\Testing\Package\TestCase; | ||
use PHPUnit\Framework\Attributes\CoversClass; | ||
|
||
use function iterator_to_array; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
#[CoversClass(Location::class)] | ||
final class LocationTest extends TestCase { | ||
public function testGetIterator(): void { | ||
self::assertEquals( | ||
[ | ||
new Coordinate(1, 0, null, 0), | ||
], | ||
iterator_to_array(new Location(1, 1)), | ||
); | ||
self::assertEquals( | ||
[ | ||
new Coordinate(1, 10, 10, 0), | ||
], | ||
iterator_to_array(new Location(1, 1, 10, 10)), | ||
); | ||
self::assertEquals( | ||
[ | ||
new Coordinate(1, 12, 10, 2), | ||
], | ||
iterator_to_array(new Location(1, 1, 10, 10, 2, 4)), | ||
); | ||
self::assertEquals( | ||
[ | ||
new Coordinate(1, 12, null, 2), | ||
new Coordinate(2, 2, null, 2), | ||
new Coordinate(3, 2, 10, 2), | ||
], | ||
iterator_to_array(new Location(1, 3, 10, 10, 2, null)), | ||
); | ||
self::assertEquals( | ||
[ | ||
new Coordinate(1, 12, null, 2), | ||
new Coordinate(2, 4, null, 4), | ||
new Coordinate(3, 4, 10, 4), | ||
], | ||
iterator_to_array(new Location(1, 3, 10, 10, 2, 4)), | ||
); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.