WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

#29843 closed defect (bug) (worksforme)

Can't run tests for themes or plugins when they use PHP sessions

Reported by: petervanderdoes Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: Build/Test Tools Keywords:
Focuses: Cc:
PR Number:

Description

Because output is generated during the installation in the test phase, themes/plugins that use PHP sessions fail as you can't have any output before you start a session.

The following files generate output.

  • tests/phpunit/includes/install.php
    • Lines
      • 33 - echo "Installing..." . PHP_EOL;
      • 50 - echo "Installing network..." . PHP_EOL;
  • tests/phpunit/includes/bootstrap.php
    • Lines
      • 56 - echo "Running as multisite..." . PHP_EOL;
      • 61 - echo "Running as single site... To run multisite, use -c tests/phpunit/multisite.xml" . PHP_EOL;

Change History (2)

#1 @SergeyBiryukov
5 years ago

  • Component changed from General to Build/Test Tools
  • Summary changed from Can't run tests for themes or plugins when the use PHP sessions to Can't run tests for themes or plugins when they use PHP sessions

#2 @wonderboymusic
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Start your session in wp-tests-config.php

Note: See TracTickets for help on using tickets.