Add a basic "harbormaster.step.edit" API method
[phabricator/blender.git] / src / __tests__ / PhabricatorCelerityTestCase.php
bloba91b214502c24db6aa9470dbbba339a17b002150
1 <?php
3 final class PhabricatorCelerityTestCase extends PhabricatorTestCase {
5 /**
6 * This is more of an acceptance test case instead of a unit test. It verifies
7 * that the Celerity map is up-to-date.
8 */
9 public function testCelerityMaps() {
10 $resources_map = CelerityPhysicalResources::getAll();
12 foreach ($resources_map as $resources) {
13 $old_map = new CelerityResourceMap($resources);
15 $new_map = id(new CelerityResourceMapGenerator($resources))
16 ->generate();
18 // Don't actually compare these values with assertEqual(), since the diff
19 // isn't helpful and is often enormously huge.
21 $maps_are_identical =
22 ($new_map->getNameMap() === $old_map->getNameMap()) &&
23 ($new_map->getSymbolMap() === $old_map->getSymbolMap()) &&
24 ($new_map->getRequiresMap() === $old_map->getRequiresMap()) &&
25 ($new_map->getPackageMap() === $old_map->getPackageMap());
27 $this->assertTrue(
28 $maps_are_identical,
29 pht(
30 'When this test fails, it means the Celerity resource map is out '.
31 'of date. Run `%s` to rebuild it.',
32 'bin/celerity map'));