1<?php 2 3class CascadeNormalTest extends DokuWikiTest 4{ 5 6 public function setUp(): void 7 { 8 $this->pluginsEnabled = [ 9 'testing' 10 ]; 11 12 parent::setUp(); 13 } 14 15 public function testDefaults() 16 { 17 global $conf; 18 19 $this->assertEquals('start', $conf['start'], 'default value'); 20 $this->assertEquals('', $conf['tagline'], 'default value'); 21 22 $this->assertFalse(isset($conf['plugin']['testing']['schnibble']), 'not set before plugin call'); 23 24 $testing = plugin_load('action', 'testing'); 25 $this->assertEquals(0, $testing->getConf('schnibble'), 'default value'); 26 } 27 28 public function testLocal() 29 { 30 global $conf; 31 32 $this->assertEquals('My Test Wiki', $conf['title'], 'overriden in local.php (values from Config manager)'); 33 34 $testing = plugin_load('action', 'testing'); 35 $this->assertEquals('Local setting', $testing->getConf('second'), 'overriden in local.php'); 36 } 37} 38