diff options
Diffstat (limited to '_testing/tests')
-rw-r--r-- | _testing/tests/testing/inttests_reset.test.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/_testing/tests/testing/inttests_reset.test.php b/_testing/tests/testing/inttests_reset.test.php new file mode 100644 index 000000000..2241421f5 --- /dev/null +++ b/_testing/tests/testing/inttests_reset.test.php @@ -0,0 +1,40 @@ +<?php + +/** + * @group integration + */ +class InttestsScopeTest extends DokuWikiTest { + + public $triggered = false; + + function testFirstRun(){ + global $conf; + $conf['foo'] = 'bar'; + + global $EVENT_HANDLER; + $null = null; + $self = $this; + $EVENT_HANDLER->register_hook('DOKUWIKI_STARTED', 'AFTER', $null, + function() use ($self) { + $self->triggered = true; + } + ); + $request = new TestRequest(); + $request->execute(); + $this->assertTrue($this->triggered); + } + + /** + * @depends testFirstRun + */ + function testSecondRun(){ + global $conf; + $this->assertFalse(isset($conf['foo']), 'conf setting'); + + $request = new TestRequest(); + $request->execute(); + + $this->assertFalse($this->triggered, 'trigger'); + } + +} |