Hi - I am working with a windows OS created wordpress plugin unit testing code written as below

<?php

class Test_WP_Simple_Plugin extends WP_UnitTestCase {

public function test_constants () {
$this->assertSame( 'wp-simple-plugin', WPSP_NAME );  //Error line

$url = str_replace( 'tests/phpunit/tests/', '',
trailingslashit( plugin_dir_url( __FILE__ ) ) );
$this->assertSame( $url, WPSP_URL );
}
}

that gives an error message

Use of undefined constant WPSP_NAME - assumed 'WPSP_NAME' (this will throw an Error in a future version of PHP)

please help what is wrong with this code? thanks

Omar_17 commented: Use j query to test coding error on WordPress +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.