Skip to content

Commit

Permalink
Tests added
Browse files Browse the repository at this point in the history
  • Loading branch information
lloc committed Apr 9, 2021
1 parent 271fbee commit f64e174
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions tests/test-MslsMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,23 @@ class MslsMenu extends TestCase {
protected function setUp(): void {
parent::setUp();
Monkey\setUp();
}

public function test_init() {
Functions\expect( 'load_plugin_textdomain' );
Functions\when( 'plugin_basename' )->justReturn( 'abc' );
}

public function test_init() {
$this->assertInstanceOf( \MslsMenu::class, \MslsMenu::init() );
}

public function test_admin_register() {
Functions\expect( '__' )->once();
Functions\expect( 'add_settings_section' )->once();

$obj = \MslsMenu::init();
$obj = new \MslsMenu();

$this->assertInstanceOf( \MslsMenu::class, $obj );
$obj->admin_register( 'test' );
$this->expectOutputString( '' );
}

protected function tearDown(): void {
Expand Down

0 comments on commit f64e174

Please sign in to comment.