mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-28 09:42:41 +01:00
212b0d29c5
Summary: Fixes T5374. Add an acceptance test to the `PhabricatorInfrastructureTestCase` class which fails if a Celerity map is not up-to-date. In order to achieve this, a lot of code used to generate Celerity maps was transferred from `CelerityManagementMapWorkflow` to `CelerityResourceMap` and `CelerityResourceMapGenerator`. Test Plan: Ran `arc unit` and noticed that all tests passed. Modified a JavaScript file and ran `arc unit` again (without running `./bin/celerity map`)... this time the test failed, as expected. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T5374 Differential Revision: https://secure.phabricator.com/D9817
33 lines
895 B
PHP
33 lines
895 B
PHP
<?php
|
|
|
|
final class PhabricatorCelerityTestCase extends PhabricatorTestCase {
|
|
|
|
/**
|
|
* This is more of an acceptance test case instead of a unit test. It verifies
|
|
* that the Celerity map is up-to-date.
|
|
*/
|
|
public function testCelerityMaps() {
|
|
$resources_map = CelerityPhysicalResources::getAll();
|
|
|
|
foreach ($resources_map as $resources) {
|
|
$old_map = new CelerityResourceMap($resources);
|
|
|
|
$new_map = id(new CelerityResourceMapGenerator($resources))
|
|
->generate();
|
|
|
|
$this->assertEqual(
|
|
$new_map->getNameMap(),
|
|
$old_map->getNameMap());
|
|
$this->assertEqual(
|
|
$new_map->getSymbolMap(),
|
|
$old_map->getSymbolMap());
|
|
$this->assertEqual(
|
|
$new_map->getRequiresMap(),
|
|
$old_map->getRequiresMap());
|
|
$this->assertEqual(
|
|
$new_map->getPackageMap(),
|
|
$old_map->getPackageMap());
|
|
}
|
|
}
|
|
|
|
}
|