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