Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/view/__tests__/PhabricatorAphrontViewTestCase.php
12249 views
1
<?php
2
3
final class PhabricatorAphrontViewTestCase extends PhabricatorTestCase {
4
5
public function testHasChildren() {
6
$view = new AphrontNullView();
7
$this->assertFalse($view->hasChildren());
8
9
$values = array(
10
null,
11
'',
12
array(),
13
array(null, ''),
14
);
15
16
foreach ($values as $value) {
17
$view->appendChild($value);
18
$this->assertFalse($view->hasChildren());
19
}
20
21
$view->appendChild('!');
22
$this->assertTrue($view->hasChildren());
23
}
24
25
}
26
27