diff --git a/src/parser/xhpast/__tests__/PHPASTParserTestCase.php b/src/parser/xhpast/__tests__/PHPASTParserTestCase.php
--- a/src/parser/xhpast/__tests__/PHPASTParserTestCase.php
+++ b/src/parser/xhpast/__tests__/PHPASTParserTestCase.php
@@ -82,7 +82,7 @@
       case 'pass':
         $this->assertEqual(0, $err, pht('Exit code for "%s".', $name));
 
-        if (!strlen($expect)) {
+        if (!phutil_nonempty_string($expect)) {
           // If there's no "expect" data in the test case, that's OK.
           break;
         }