Page MenuHomePhabricator

Improve the `PhutilInfrastructureTestCase` unit tests
ClosedPublic

Authored by joshuaspence on Jul 5 2014, 6:54 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 5:22 PM
Unknown Object (File)
Sun, Nov 24, 6:59 AM
Unknown Object (File)
Sun, Nov 24, 6:35 AM
Unknown Object (File)
Sun, Nov 24, 6:33 AM
Unknown Object (File)
Mon, Nov 18, 7:42 AM
Unknown Object (File)
Mon, Nov 11, 1:09 AM
Unknown Object (File)
Sun, Nov 10, 9:45 AM
Unknown Object (File)
Wed, Oct 30, 2:38 PM
Subscribers

Details

Summary

Improve the PhutilInfrastructureTestCase unit tests such that they will fail if any of the following conditions are satisfied:

  • A symbol referenced in the __phutil_library_map__.php file no longer exists.
  • A symbol exists in the library but is not referenced within the __phutil_library_map__.php file.
  • A symbol extends from a different parent symbol than that declared in the __phutil_library_map.php file.
Test Plan

Added a new function. Ran arc unit and observed the test failure.

Diff Detail

Repository
rPHU libphutil
Branch
librarytest
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 1523
Build 1523: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

joshuaspence retitled this revision from to Improve the `PhutilInfrastructureTestCase::testEverythingImplemented` unit test.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
joshuaspence edited edge metadata.
  • Rename test method
src/moduleutils/PhutilLibraryMapBuilder.php
70–82

I removed this because it simplifies the implementation. Plus, I doubt this is commonly used.

epriestley edited edge metadata.

I think we should retain the phase where the code is loaded. Particularly, it detects things like:

  • syntax error in some file;
  • subclass extending an abstract base class but not implementing all of the required methods.

It seems like we can no longer detect those issues?

This revision now requires changes to proceed.Jul 5 2014, 2:48 PM
joshuaspence edited edge metadata.
  • Rename test method
  • Retain the original test case as well.
  • Improve assertion message
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jul 5 2014, 3:20 PM
joshuaspence retitled this revision from Improve the `PhutilInfrastructureTestCase::testEverythingImplemented` unit test to Improve the `PhutilInfrastructureTestCase` unit tests.Jul 5 2014, 3:20 PM
joshuaspence updated this object.
joshuaspence edited edge metadata.