Skip to content

Commit

Permalink
Add tests for Plugins_Screens::get_instance().
Browse files Browse the repository at this point in the history
  • Loading branch information
costdev committed Nov 30, 2024
1 parent f4326db commit 047faf8
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 PluginsScreens_GetInstanceTest
*
* @package AspireUpdate
*/

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

0 comments on commit 047faf8

Please sign in to comment.