Skip to content

Instantly share code, notes, and snippets.

@MuhammadQuran17
Last active November 5, 2025 08:19
Show Gist options
  • Select an option

  • Save MuhammadQuran17/34bdb52742dd768defe66ee8feb0544f to your computer and use it in GitHub Desktop.

Select an option

Save MuhammadQuran17/34bdb52742dd768defe66ee8feb0544f to your computer and use it in GitHub Desktop.
Testing Cheatsheet

Regression testing is a software testing process to ensure that code modifications, such as bug fixes or feature updates, haven't negatively impacted or broken previously functioning aspects of the software

How to access private method for testing purpose

 // Create a reflection of the private method to make it accessible for testing.
    $method = new ReflectionMethod(TransformDataForFrontend::class, 'removeUUIDsInString');
    $method->setAccessible(true);

    return $method->invoke((new TransformDataForFrontend), $sql);

PHPunit

./vendor/bin/phpunit --log-events-verbose-text='test.txt' vendor/figma/core/modules/Fe/tests/Unit/FeConfigTest.php

with extending verbose text written to test.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment