Skip to content

Commit

Permalink
Add tests for Themes_Screens::get_instance(). (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
costdev authored Dec 1, 2024
1 parent 43b86fc commit d185434
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 ThemesScreens_GetInstanceTest
*
* @package AspireUpdate
*/

/**
* Tests for Themes_Screens::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\Themes_Screens::get_instance
*/
class ThemesScreens_GetInstanceTest extends WP_UnitTestCase {
/**
* Test that the same instance is retrieved.
*/
public function test_should_get_the_same_instance() {
$this->assertSame(
AspireUpdate\Themes_Screens::get_instance(),
AspireUpdate\Themes_Screens::get_instance()
);
}
}

0 comments on commit d185434

Please sign in to comment.