mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-24 15:52:41 +01:00
26 lines
515 B
PHP
26 lines
515 B
PHP
|
<?php
|
||
|
|
||
|
final class PhabricatorAphrontViewTestCase extends PhabricatorTestCase {
|
||
|
|
||
|
public function testHasChildren() {
|
||
|
$view = new AphrontNullView();
|
||
|
$this->assertEqual(false, $view->hasChildren());
|
||
|
|
||
|
$values = array(
|
||
|
null,
|
||
|
'',
|
||
|
array(),
|
||
|
array(null, ''),
|
||
|
);
|
||
|
|
||
|
foreach ($values as $value) {
|
||
|
$view->appendChild($value);
|
||
|
$this->assertEqual(false, $view->hasChildren());
|
||
|
}
|
||
|
|
||
|
$view->appendChild("!");
|
||
|
$this->assertEqual(true, $view->hasChildren());
|
||
|
}
|
||
|
|
||
|
}
|