Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
enumag committed May 6, 2021
1 parent a34ebca commit e1dbcd6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ds
coverage: none

- run: composer install --no-progress --prefer-dist
Expand All @@ -41,6 +42,7 @@ jobs:
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: ds
coverage: none

- run: composer install --no-progress --prefer-dist
Expand Down
33 changes: 33 additions & 0 deletions tests/Tracy/Dumper.toText().specials.ds.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

/**
* Test: Tracy\Dumper::toText() specials
*/

declare(strict_types=1);

use Tester\Assert;
use Tracy\Dumper;

require __DIR__ . '/../bootstrap.php';


// ext-ds collection
$collection = new \Ds\Vector(['value']);
Assert::match(<<<'XX'
Ds\Vector #%d%
0: 'value'
XX
, Dumper::toText($collection));


// ext-ds map
$map = new \Ds\Map;
$map->put('key', 'value');
Assert::match(<<<'XX'
Ds\Map #%d%
0: Ds\Pair #%d%
| key: 'key'
| value: 'value'
XX
, Dumper::toText($map));

0 comments on commit e1dbcd6

Please sign in to comment.