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