Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public function tearDownOnce()
 {
     parent::tearDownOnce();
     NewsPage::set_weights($this->savedNewsweights);
 }