Codeception\Module\WPBootstrapperTest::it_should_restore_global_state_after_first_bootstrapping PHP Method

it_should_restore_global_state_after_first_bootstrapping() public method

    public function it_should_restore_global_state_after_first_bootstrapping()
    {
        vfsStream::setup('wproot3', null, ['wp' => ['wp-load.php' => 'some content']]);
        $this->config['wpRootFolder'] = vfsStream::url('wproot3/wp');
        $this->restorer->restoreGlobalVariables(Argument::any())->shouldBeCalled();
        $this->restorer->restoreStaticAttributes(Argument::any())->shouldBeCalled();
        $sut = $this->make_instance();
        $sut->_initialize();
        global $someVar;
        $someVar = 'foo';
        $sut->bootstrapWp();
        $someVar = null;
        $sut->bootstrapWp();
        $this->assertEquals('foo', $someVar);
    }