public function testWeightManipulation() { NewsPage::set_weights(array()); $weights = array('Normal', 'Teaser', 'Headline'); do { NewsPage::set_weights($weights); $this->assertEquals($weights, NewsPage::get_weights()); foreach (array_slice($weights, 1) as $w) { $this->assertTrue(Object::has_extension('NewsHolder', "NewsWeight{$w}")); } array_pop($weights); } while ($weights); }
public function tearDownOnce() { parent::tearDownOnce(); NewsPage::set_weights($this->savedNewsweights); }