1
0

first commit

This commit is contained in:
2020-08-06 15:36:28 +08:00
commit fe5c11976c
12348 changed files with 1411979 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
use Tests\Models\Tree;
class ModelTreeTest extends TestCase
{
public function setUp()
{
parent::setUp();
}
public function testSelectOptions()
{
$rootText = 'Root Text';
$options = Tree::selectOptions(function ($query) {
return $query->where('uri', '');
}, $rootText);
$count = Tree::query()->where('uri', '')->count();
$this->assertEquals(array_shift($options), $rootText);
$this->assertEquals(count($options), $count);
}
}