Exemple #1
0
 function assertNodes($expected, $nodes)
 {
     $valid = $this->compareNodes($expected, $nodes);
     $msg = '';
     if (!$valid) {
         ob_start();
         Helper::dumpTree((object) ['type' => Renderer::P_ROOT, 'nodes' => $expected]);
         $e = ob_get_clean();
         ob_start();
         Helper::dumpTree((object) ['type' => Renderer::P_ROOT, 'nodes' => $nodes]);
         $t = ob_get_clean();
         $d = new \SebastianBergmann\Diff\Differ();
         $msg = $d->diff($e, $t);
     }
     $this->assertTrue($valid, $msg);
 }
Exemple #2
0
 function testNodeNameUnknown()
 {
     $name = \Tempe\Helper::nodeName(9999999);
     $this->assertEquals('UNKNOWN', $name);
 }