1111
1212namespace PluginNameUnitTests \Admin ;
1313
14+ use Brain \Monkey \Expectation \Exception \ExpectationArgsRequired ;
1415use PluginName \Plugin ;
1516use PluginNameTests \TestCase ;
1617use PluginName \Admin \SettingsPage ;
2021
2122/**
2223 * Class SettingsPageTest
23- *
24- * @since {VERSION}
25- *
26- * @package PluginNameUnitTests\Admin
2724 */
2825class SettingsPageTest extends TestCase {
2926
3027 /**
3128 * Test for adding hooks
32- *
33- * @since {VERSION}
3429 */
35- public function test_hooks () {
30+ public function testHooks (): void {
3631 $ settings = new SettingsPage ();
3732
3833 $ settings ->hooks ();
@@ -44,10 +39,8 @@ public function test_hooks() {
4439
4540 /**
4641 * Test don't enqueue styles
47- *
48- * @since {VERSION}
4942 */
50- public function test_DONT_enqueue_styles () {
43+ public function testDontEnqueueStyles (): void {
5144 $ settings = new SettingsPage ();
5245
5346 $ settings ->enqueue_styles ( 'hook-suffix ' );
@@ -56,11 +49,9 @@ public function test_DONT_enqueue_styles() {
5649 /**
5750 * Test enqueue styles
5851 *
59- * @since {VERSION}
60- *
61- * @throws \Brain\Monkey\Expectation\Exception\ExpectationArgsRequired Invalid arguments.
52+ * @throws ExpectationArgsRequired Invalid arguments.
6253 */
63- public function test_enqueue_styles () {
54+ public function testEnqueueStyles (): void {
6455 $ settings = new SettingsPage ();
6556 expect ( 'wp_enqueue_style ' )
6657 ->once ()
@@ -77,10 +68,8 @@ public function test_enqueue_styles() {
7768
7869 /**
7970 * Test don't enqueue scripts
80- *
81- * @since {VERSION}
8271 */
83- public function test_DONT_enqueue_scripts () {
72+ public function testDontEnqueueScripts (): void {
8473 $ settings = new SettingsPage ();
8574
8675 $ settings ->enqueue_scripts ( 'hook-suffix ' );
@@ -89,11 +78,9 @@ public function test_DONT_enqueue_scripts() {
8978 /**
9079 * Test enqueue scripts
9180 *
92- * @since {VERSION}
93- *
94- * @throws \Brain\Monkey\Expectation\Exception\ExpectationArgsRequired Invalid arguments.
81+ * @throws ExpectationArgsRequired Invalid arguments.
9582 */
96- public function test_enqueue_scripts () {
83+ public function testEnqueueScripts (): void {
9784 $ settings = new SettingsPage ();
9885 expect ( 'wp_enqueue_script ' )
9986 ->once ()
@@ -111,11 +98,9 @@ public function test_enqueue_scripts() {
11198 /**
11299 * Test register menu
113100 *
114- * @since {VERSION}
115- *
116- * @throws \Brain\Monkey\Expectation\Exception\ExpectationArgsRequired Invalid arguments.
101+ * @throws ExpectationArgsRequired
117102 */
118- public function test_add_menu () {
103+ public function testAddMenu (): void {
119104 $ settings = new SettingsPage ();
120105 when ( 'esc_html__ ' )->returnArg ();
121106 expect ( 'add_menu_page ' )
@@ -137,17 +122,15 @@ public function test_add_menu() {
137122 /**
138123 * Test view for settings page
139124 *
140- * @since {VERSION}
141- *
142- * @throws \Brain\Monkey\Expectation\Exception\ExpectationArgsRequired Invalid arguments.
125+ * @throws ExpectationArgsRequired
143126 */
144- public function test_page_option () {
145- $ page_title = 'Plugin Name Settings ' ;
146- $ settings = new SettingsPage ();
127+ public function testPageOption (): void {
128+ $ pageTitle = 'Plugin Name Settings ' ;
129+ $ settings = new SettingsPage ();
147130 expect ( 'get_admin_page_title ' )
148131 ->once ()
149132 ->withNoArgs ()
150- ->andReturn ( $ page_title );
133+ ->andReturn ( $ pageTitle );
151134 when ( 'esc_html ' )->returnArg ();
152135
153136 $ settings ->page_options ();
0 commit comments