~ubuntu-branches/ubuntu/vivid/phabricator/vivid-proposed

« back to all changes in this revision

Viewing changes to arcanist/src/__tests__/ArcanistInfrastructureTestCase.php

  • Committer: Package Import Robot
  • Author(s): Richard Sellam
  • Date: 2015-01-29 00:15:58 UTC
  • mfrom: (0.16.1) (0.15.1) (0.12.2) (2.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20150129001558-na84707j70qqla7z
Tags: 0~git20150129-1
* New snapshot release
* restricted access to local config file (closes: #775479)
* moved local config file to /var/lib/phabricator (closes: #775478)
* switched mysql-server dependency to recommends (closes: #773536)
* use /run instead of /var/run (closes: #775803)
* prevent package reinstall from overwritting local changes (closes: #776288)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
 
3
 
final class ArcanistInfrastructureTestCase extends ArcanistTestCase {
4
 
 
5
 
  /**
6
 
   * This is more of an acceptance test case instead of a unit test. It verifies
7
 
   * that all symbols can be loaded correctly. It can catch problems like
8
 
   * missing methods in descendants of abstract base classes.
9
 
   */
10
 
  public function testEverythingImplemented() {
11
 
    id(new PhutilSymbolLoader())->selectAndLoadSymbols();
12
 
    $this->assertTrue(true);
13
 
  }
14
 
 
15
 
  /**
16
 
   * This is more of an acceptance test case instead of a unit test. It verifies
17
 
   * that all the library map is up-to-date.
18
 
   */
19
 
  public function testLibraryMap() {
20
 
    $library = phutil_get_current_library_name();
21
 
    $root = phutil_get_library_root($library);
22
 
 
23
 
    $new_library_map = id(new PhutilLibraryMapBuilder($root))
24
 
      ->buildMap();
25
 
 
26
 
    $bootloader = PhutilBootloader::getInstance();
27
 
    $old_library_map = $bootloader->getLibraryMapWithoutExtensions($library);
28
 
    unset($old_library_map[PhutilLibraryMapBuilder::LIBRARY_MAP_VERSION_KEY]);
29
 
 
30
 
    $this->assertEqual(
31
 
      $new_library_map,
32
 
      $old_library_map,
33
 
      'The library map does not appear to be up-to-date. Try '.
34
 
      'rebuilding the map with `arc liberate`.');
35
 
  }
36
 
 
37
 
}