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