Skip to content

Commit

Permalink
Add tests for Admin_Settings::get_instance(). (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
costdev authored Dec 4, 2024
1 parent 0f6e151 commit 8d73e5b
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* Class AdminSettings_GetInstanceTest
*
* @package AspireUpdate
*/

/**
* Tests for Admin_Settings::get_instance()
*
* These tests rely on the method not being called during earlier test runs.
* They must run in separate processes and must not preserve global state.
*
* @runTestsInSeparateProcesses
* @preserveGlobalState disabled
*
* @covers \AspireUpdate\Admin_Settings::get_instance
*/
class AdminSettings_GetInstanceTest extends AdminSettings_UnitTestCase {
/**
* Test that the same instance is retrieved.
*/
public function test_should_get_the_same_instance() {
$this->assertSame(
AspireUpdate\Admin_Settings::get_instance(),
AspireUpdate\Admin_Settings::get_instance()
);
}
}

0 comments on commit 8d73e5b

Please sign in to comment.