Skip to content

Commit

Permalink
Tests #78 - add tests for some of problems noted
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbingwide committed Nov 21, 2019
1 parent a62ee31 commit fabba06
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions tests/test-issue-78.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

/**
* @copyright Bobbing Wide 2018, 2019
* @package oik-bwtrace
*
* Tests for logic in oik-bwtrace.php
*/
class Tests_issue_78 extends BW_UnitTestCase {

public $bw_trace_on = null;

function setUp() : void {
parent::setUp();
oik_require( "includes/oik-actions.php", "oik-bwtrace" );
}

function test_bw_trace_ok_to_echo_woocommerce_product_export() {
$_REQUEST['action'] = 'download_product_csv';
$ok = bw_trace_ok_to_echo();
$this->assertFalse( $ok );
}

function test_bw_trace_ok_to_echo_block_data_export() {
$_REQUEST['block_data_export'] = 'Advanced Gutenberg Contact Form sets this';
$ok = bw_trace_ok_to_echo();
$this->assertFalse( $ok );
}

function test_bw_trace_ok_to_echo_edd_api() {
$_REQUEST['edd-api'] = 'Easy Digital Downloads API sets this';
$ok = bw_trace_ok_to_echo();
$this->assertFalse( $ok );
}

}

0 comments on commit fabba06

Please sign in to comment.