Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
/**
* Plugin Name: Do Something for WooCommerce and Xyz
* Plugin URI: https://github.com/WordPress/plugin-check
* Description: Test plugin for the Trademarks check.
* Requires at least: 6.0
* Requires PHP: 5.6
* Version: 1.0.0
* Author: WordPress Performance Team
* Author URI: https://make.wordpress.org/performance/
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* Text Domain: test-trademarks-plugin-header-for-woocommerce-middle
*
* @package test-trademarks-plugin-header-for-woocommerce-middle
*/
13 changes: 13 additions & 0 deletions tests/phpunit/tests/Checker/Checks/Trademarks_Check_Tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,19 @@ public function test_trademarks_with_for_woocommerce_exceptions() {
$this->assertSame( 0, $check_result->get_warning_count() );
}

public function test_trademarks_with_for_woocommerce_exception_in_middle_of_name() {
$check_context = new Check_Context( UNIT_TESTS_PLUGIN_DIR . 'test-trademarks-plugin-header-for-woocommerce-middle/load.php' );
$check_result = new Check_Result( $check_context );

$check = new Trademarks_Check( Trademarks_Check::TYPE_NAME );
$check->run( $check_result );

$warnings = $check_result->get_warnings();

$this->assertEmpty( $warnings );
$this->assertSame( 0, $check_result->get_warning_count() );
}

public function test_single_file_plugin_without_error_for_trademarks() {
$trademarks_check = new Trademarks_Check();
$check_context = new Check_Context( WP_PLUGIN_DIR . '/single-file-plugin.php' );
Expand Down
Loading