[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class DiffusionPathQueryTestCase extends PhabricatorTestCase { 4 5 public function testParentEdgeCases() { 6 $this->assertEqual( 7 '/', 8 DiffusionPathIDQuery::getParentPath('/'), 9 'Parent of /'); 10 $this->assertEqual( 11 '/', 12 DiffusionPathIDQuery::getParentPath('x.txt'), 13 'Parent of x.txt'); 14 $this->assertEqual( 15 '/a', 16 DiffusionPathIDQuery::getParentPath('/a/b'), 17 'Parent of /a/b'); 18 $this->assertEqual( 19 '/a', 20 DiffusionPathIDQuery::getParentPath('/a///b'), 21 'Parent of /a///b'); 22 } 23 24 public function testExpandEdgeCases() { 25 $this->assertEqual( 26 array('/'), 27 DiffusionPathIDQuery::expandPathToRoot('/')); 28 $this->assertEqual( 29 array('/'), 30 DiffusionPathIDQuery::expandPathToRoot('//')); 31 $this->assertEqual( 32 array('/a/b', '/a', '/'), 33 DiffusionPathIDQuery::expandPathToRoot('/a/b')); 34 $this->assertEqual( 35 array('/a/b', '/a', '/'), 36 DiffusionPathIDQuery::expandPathToRoot('/a//b')); 37 $this->assertEqual( 38 array('/a/b', '/a', '/'), 39 DiffusionPathIDQuery::expandPathToRoot('a/b')); 40 } 41 42 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |