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

Be a part of the DaniWeb community

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