bobbingwide / sb-chart-block

Chart block for Gutenberg
GNU General Public License v3.0
6 stars 0 forks source link

Create PHPUnit test cases for server code #25

Closed bobbingwide closed 1 year ago

bobbingwide commented 2 years ago

Some not insignificant changes are currently being developed. It's about time we implemented some regression testing capability for the PHP code.

Requirements

Proposed solution

misaki-web commented 2 years ago

We may also have a boolean constant (like SB_CHART_BLOCK_DEBUG) to deal with commented debug lines. Examples:

https://github.com/bobbingwide/sb-chart-block/blob/22ebbf178529f30d678e2c1d558a6660f2625386/libs/class-sb-chart-block.php#L78

https://github.com/bobbingwide/sb-chart-block/blob/22ebbf178529f30d678e2c1d558a6660f2625386/libs/class-sb-chart-block.php#L98

Something like this:

if ( SB_CHART_BLOCK_DEBUG ) print_r( $atts );
bobbingwide commented 1 year ago

Delivered in v1.2.0