Skip to content

Commit

Permalink
pretend to fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dakujem committed Jan 15, 2024
1 parent 8ae9ed8 commit 1474bf2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions tests/mptree.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ declare(strict_types=1);

use Dakujem\Oliva\Iterator\Filter;
use Dakujem\Oliva\Iterator\PreOrderTraversal;
use Dakujem\Oliva\MaterializedPath\Support\Tree;
use Dakujem\Oliva\MaterializedPath\TreeBuilder;
use Dakujem\Oliva\Node;
use Dakujem\Oliva\Seed;
use Dakujem\Oliva\TreeNodeContract;
use Tester\Assert;
use Tester\Environment;

require_once __DIR__ . '/../vendor/autoload.php';
Expand Down Expand Up @@ -66,6 +68,10 @@ new Filter($it, Seed::omitRoot());

$item = $tree->root()?->data();

Assert::type(Tree::class, $tree);
Assert::type(Node::class, $tree->root());
Assert::null($tree->root()?->data());
Assert::type(Item::class, Seed::first($tree->root()?->children())?->data());

// rekalkulacia / presuny ?
Expand Down
5 changes: 3 additions & 2 deletions tests/recursive.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ declare(strict_types=1);
use Dakujem\Oliva\Node;
use Dakujem\Oliva\Recursive\TreeBuilder;
use Dakujem\Oliva\Seed;
use Tester\Assert;
use Tester\Environment;

require_once __DIR__ . '/../vendor/autoload.php';
Expand Down Expand Up @@ -39,5 +40,5 @@ $tree = $builder->build(
parent: fn(?Item $item) => $item?->parent,
);

xdebug_break();
$foo = 1;

Assert::type(Node::class, $tree);

0 comments on commit 1474bf2

Please sign in to comment.