assertContains(ADPLUGG_OVERRIDE_ACCESS_CODE, $outbound); } else { $this->assertEquals('', $outbound); } } /** * Test that the adplugg_add_api function outputs the api when the * access_code is set. */ public function test_adplugg_add_api_outputs_api() { //Set the access_code $options = get_option(ADPLUGG_OPTIONS_NAME, array()); $options['access_code'] = 'A0000'; update_option(ADPLUGG_OPTIONS_NAME, $options); //Output the API ob_start(); adplugg_add_api(); $outbound = ob_get_contents(); ob_end_clean(); //Assert that the API is output. $this->assertContains('assertContains('qunit', $outbound); } }