File tree 1 file changed +8
-10
lines changed
1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 11
11
*/
12
12
class TestMslsOptionsQueryPostType extends MslsUnitTestCase {
13
13
14
- function get_test () {
14
+ protected function setUp (): void {
15
+ parent ::setUp ();
16
+
15
17
Functions \expect ( 'get_option ' )->once ()->andReturn ( [ 'de_DE ' => 42 ] );
16
18
17
- return new MslsOptionsQueryPostType ();
19
+ $ this -> test = new MslsOptionsQueryPostType ();
18
20
}
19
21
20
- function test_has_value_method () {
21
- $ obj = $ this ->get_test ();
22
-
23
- $ this ->assertIsBool ( $ obj ->has_value ( 'de_DE ' ) );
22
+ public function test_has_value (): void {
23
+ $ this ->assertIsBool ( $ this ->test ->has_value ( 'de_DE ' ) );
24
24
}
25
25
26
- function test_get_current_link_method () {
26
+ public function test_get_current_link (): void {
27
27
Functions \expect ( 'get_post_type_archive_link ' )->once ()->andReturn ( 'https://example.org/queried-posttype ' );
28
28
29
- $ obj = $ this ->get_test ();
30
-
31
- $ this ->assertEquals ( 'https://example.org/queried-posttype ' , $ obj ->get_current_link () );
29
+ $ this ->assertEquals ( 'https://example.org/queried-posttype ' , $ this ->test ->get_current_link () );
32
30
}
33
31
34
32
}
You can’t perform that action at this time.
0 commit comments