Skip to content

Commit 2381902

Browse files
committed
Tests enhanced
1 parent c70a1b9 commit 2381902

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

tests/TestMslsOptionsQueryDay.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,21 @@
1111
*/
1212
class TestMslsOptionsQueryDay extends MslsUnitTestCase {
1313

14-
function get_test() {
14+
public function setUp(): void {
1515
Functions\expect( 'get_option' )->once()->andReturn( [ 'de_DE' => 42 ] );
1616

17-
return new MslsOptionsQueryDay();
17+
$this->test = new MslsOptionsQueryDay();
1818
}
1919

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' ) );
2423
}
2524

26-
function test_get_current_link_method() {
25+
public function test_get_current_link(): void {
2726
Functions\expect( 'get_day_link' )->once()->andReturn( 'https://example.org/queried-day' );
2827

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() );
3229
}
3330

3431
}

0 commit comments

Comments
 (0)