diff --git a/src/lint/linter/__tests__/xhpast/php54.lint-test b/src/lint/linter/__tests__/xhpast/php54.lint-test index 8bc7d664..37265d05 100644 --- a/src/lint/linter/__tests__/xhpast/php54.lint-test +++ b/src/lint/linter/__tests__/xhpast/php54.lint-test @@ -1,7 +1,10 @@ m()[0]; + m()[0]; + +// The check above should be this, see T4334. +// $o->m()[0]; ~~~~~~~~~~ disabled:3:5 diff --git a/src/unit/engine/__tests__/XUnitTestResultParserTestCase.php b/src/unit/engine/__tests__/XUnitTestResultParserTestCase.php index 8f96941d..f9bb30a1 100644 --- a/src/unit/engine/__tests__/XUnitTestResultParserTestCase.php +++ b/src/unit/engine/__tests__/XUnitTestResultParserTestCase.php @@ -37,6 +37,8 @@ final class XUnitTestResultParserTestCase extends ArcanistTestCase { } catch (Exception $e) { // OK } + + $this->assertEqual(true, true); } public function testInvalidXmlInputFailure() { @@ -50,6 +52,8 @@ final class XUnitTestResultParserTestCase extends ArcanistTestCase { } catch (Exception $e) { // OK } + + $this->assertEqual(true, true); } } diff --git a/src/unit/engine/phutil/ArcanistPhutilTestCase.php b/src/unit/engine/phutil/ArcanistPhutilTestCase.php index 2825ebcd..73234d77 100644 --- a/src/unit/engine/phutil/ArcanistPhutilTestCase.php +++ b/src/unit/engine/phutil/ArcanistPhutilTestCase.php @@ -464,6 +464,14 @@ abstract class ArcanistPhutilTestCase { $exceptions); } } + + if (!$this->assertions) { + $this->failTest( + pht( + 'This test case made no assertions. Test cases must make at '. + 'least one assertion.')); + } + } catch (ArcanistPhutilTestTerminatedException $ex) { // Continue with the next test. } catch (ArcanistPhutilTestSkippedException $ex) {