File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change 1111 */
1212class TestMslsOptionsQueryPostType extends MslsUnitTestCase {
1313
14- function get_test () {
14+ protected function setUp (): void {
15+ parent ::setUp ();
16+
1517 Functions \expect ( 'get_option ' )->once ()->andReturn ( [ 'de_DE ' => 42 ] );
1618
17- return new MslsOptionsQueryPostType ();
19+ $ this -> test = new MslsOptionsQueryPostType ();
1820 }
1921
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 ' ) );
2424 }
2525
26- function test_get_current_link_method () {
26+ public function test_get_current_link (): void {
2727 Functions \expect ( 'get_post_type_archive_link ' )->once ()->andReturn ( 'https://example.org/queried-posttype ' );
2828
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 () );
3230 }
3331
3432}
You can’t perform that action at this time.
0 commit comments