示例#1
0
 public function testRootNode()
 {
     Debug::debug('root-' . md5($_SERVER['REQUEST_TIME']));
     $root = new Tree();
     #$root->id = ran;
     #$root->domain_id = 'test-root-node';
     $root->domain_id = 'root-' . md5($_SERVER['REQUEST_TIME']);
     $root->name = 'I am a Root-Node';
     $root->makeRoot();
     $root->save();
     $this->assertSame($root->errors, [], 'Root node has errors');
 }