def METHOD_NAME(self):
    self.maxDiff = None
    dg = DependencyGraph(si.ID_TO_ITEM.values(), layer_target="ttt")
    builders_and_phases = list(dg.ordered_phases())
    self.assertEqual(
        [
            (FilesystemRootItem.get_phase_builder, (si.ID_TO_ITEM["/"],)),
            (
                RpmActionItem.get_phase_builder,
                (
                    si.ID_TO_ITEM[".rpms/remove_if_exists/rpm-test-carrot"],
                    si.ID_TO_ITEM[".rpms/remove_if_exists/rpm-test-milk"],
                ),
            ),
            (
                RpmActionItem.get_phase_builder,
                (
                    si.ID_TO_ITEM[".rpms/install/rpm-test-mice"],
                    si.ID_TO_ITEM[".rpms/install/rpm-test-cheese-2-1.rpm"],
                ),
            ),
            (
                RemovePathItem.get_phase_builder,
                (
                    si.ID_TO_ITEM[".remove_if_exists/path/to/remove"],
                    si.ID_TO_ITEM[".remove_assert_exists/path/to/remove"],
                    si.ID_TO_ITEM[".remove_assert_exists/another/path/to/remove"],
                ),
            ),
        ],
        builders_and_phases,
    )
    phase_items = [i for _, items in builders_and_phases for i in items]
    with TempSubvolumes(Path(sys.argv[0])) as temp_subvolumes:
        subvol = temp_subvolumes.create("subvol")
        doi = list(
            itertools.chain(
                *dg.gen_dependency_order_items(
                    PhasesProvideItem(from_target="t", subvol=subvol)
                )
            )
        )
    self.assertEqual(
        len(si.ID_TO_ITEM),
        len(doi) + len(phase_items),
        msg="Duplicate items?",
    )
    id_to_idx = {
        k: doi.index(v) for k, v in si.ID_TO_ITEM.items() if v not in phase_items
    }
    self.assertLess(id_to_idx["alpha"], id_to_idx["alpha/beta"])
    self.assertLess(id_to_idx["bad_mode:alpha"], id_to_idx["alpha/beta"])
    self.assertLess(id_to_idx["foo"], id_to_idx["foo/bar"])
    self.assertLess(id_to_idx["foo"], id_to_idx["foo/borf"])
    self.assertLess(id_to_idx["foo/borf"], id_to_idx["foo/borf/beep"])
    self.assertLess(id_to_idx["foo/bar"], id_to_idx["foo/bar/baz"])
    self.assertLess(id_to_idx["foo/bar"], id_to_idx["foo/fighter"])
    self.assertLess(id_to_idx["foo/bar"], id_to_idx["foo/face"])
    self.assertLess(id_to_idx["foo/borf"], id_to_idx["foo/borf/hello_world"])