30 lines
752 B
PHP
30 lines
752 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace WPMultiCity\Tests;
|
|
|
|
use WPMultiCity\OptionsPage;
|
|
|
|
final class OptionsPageTest extends TestCase
|
|
{
|
|
public function test_register_attaches_acf_init_action(): void
|
|
{
|
|
OptionsPage::register();
|
|
|
|
self::assertNotFalse(
|
|
has_action('acf/init', [OptionsPage::class, 'do_register']),
|
|
'OptionsPage::register() must hook acf/init'
|
|
);
|
|
}
|
|
|
|
public function test_register_attaches_main_town_slug_filter(): void
|
|
{
|
|
OptionsPage::register();
|
|
|
|
self::assertNotFalse(
|
|
has_filter('wpmc_main_town_slug', ['WPMultiCity\\Helpers', 'main_town_slug']),
|
|
'OptionsPage::register() must hook wpmc_main_town_slug filter'
|
|
);
|
|
}
|
|
}
|