function TaxonomyEdgeTreeTestCase::testOrder in Taxonomy Edge 6
Same name and namespace in other branches
- 8 tests/tree.test \TaxonomyEdgeTreeTestCase::testOrder()
- 7 tests/tree.test \TaxonomyEdgeTreeTestCase::testOrder()
File
- tests/
tree.test, line 270
Class
- TaxonomyEdgeTreeTestCase
- @file
Code
function testOrder() {
$valid_order = taxonomy_edge_is_order_valid($this->vocabulary['vid'], TRUE);
$this
->assertFALSE($valid_order, 'Order is invalid before sort');
$invalid_order = taxonomy_edge_is_order_invalid($this->vocabulary['vid'], TRUE);
$this
->assertTRUE($invalid_order, 'At least one order is invalid before sort');
$context = array();
taxonomy_edge_rebuild_order($this->vocabulary['vid'], $context);
$valid_order = taxonomy_edge_is_order_valid($this->vocabulary['vid'], TRUE);
$this
->assertTRUE($valid_order, 'Order is valid after sort');
$invalid_order = taxonomy_edge_is_order_invalid($this->vocabulary['vid'], TRUE);
$this
->assertFALSE($invalid_order, 'All orders are valid after sort');
taxonomy_edge_invalidate_order($this->vocabulary['vid']);
$valid_order = taxonomy_edge_is_order_valid($this->vocabulary['vid'], TRUE);
$this
->assertFALSE($valid_order, 'Order is invalid after invalidation');
}