Problem/Motivation

Coming from https://git.drupalcode.org/project/automatic_updates/-/work_items/356704...

In FixtureManipulator there are four instances of an assert() where we don't just verify something but do actual work. These are all instances of file_put_contents() function calls.

Given #3398033: Fix deprecated assert.active directive, and just in general, we shouldn't rely on code running within assert(), it makes the tests harder to debug and seems to stretch how we should be using asserts.

Steps to reproduce

Run automatic_updates functional tests on a mod_php setup (i.e. Drupal's GitLab CI template setup).

Proposed resolution

Set a variable for the result of file_put_contents() and assert that, instead of the direct function call.

Remaining tasks

  • MR
  • Review

User interface changes

n/a

Introduced terminology

n/a

API changes

n/a

Data model changes

n/a

Release notes snippet

n/a

Issue fork drupal-3642947

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

star-szr created an issue. See original summary.

star-szr’s picture

Title: FixtureManipulator: Don't try to create files inside an assert() » FixtureManipulator: Don't try to write files inside an assert()

ahmed-abdo made their first commit to this issue’s fork.