Done !
| Server IP : 46.105.57.169 / Your IP : 216.73.216.67 Web Server : Apache System : Linux webm002.cluster120.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : verseaumee ( 152031) PHP Version : 8.5.7 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/verseaumee/blueversion/wp-content/plugins/really-simple-ssl/tests/ |
Upload File : |
<?php
class RSSSLDisableIndexingTest extends WP_UnitTestCase {
/**
* Class RSSSLDisableXMLRPCTest
*
* Test class for disable-xmlrpc.php functions
*/
public function setUp(): void {
parent::setUp();
require_once __DIR__ . '/../security/server/disable-indexing.php';
}
/**
* Test if the 'rsssl_disable_indexing_rules' function is added to the 'rsssl_htaccess_security_rules' filter
*/
public function test_rsssl_disable_indexing_rules_added() {
$this->assertNotFalse(has_filter('rsssl_htaccess_security_rules', 'rsssl_disable_indexing_rules'));
}
/**
* Test if the 'rsssl_disable_indexing_rules' function modifies the rules as expected
*/
public function test_rsssl_disable_indexing_rules() {
$rules = [];
$expected_rules = [
[
'rules' => "\n" . 'Options -Indexes',
'identifier' => 'Options -Indexes',
],
];
// Test the 'rsssl_disable_indexing_rules' function directly
$modified_rules = rsssl_disable_indexing_rules($rules);
$this->assertEquals($expected_rules, $modified_rules);
}
}