diff --git a/tests/phpunit/tests/Utilities/Utilities_IncludeFileTest.php b/tests/phpunit/tests/Utilities/Utilities_IncludeFileTest.php new file mode 100644 index 0000000..4301695 --- /dev/null +++ b/tests/phpunit/tests/Utilities/Utilities_IncludeFileTest.php @@ -0,0 +1,37 @@ +assertEmpty( $output ); + } + + /** + * Test that a file is not included when it does not exist. + */ + public function test_should_not_include_file_when_file_does_not_exist() { + $output = get_echo( [ 'AspireUpdate\Utilities', 'include_file' ], [ 'non-existent-file.php' ] ); + $this->assertEmpty( $output ); + } + + /** + * Test that a file is included. + */ + public function test_should_include_file() { + $output = get_echo( [ 'AspireUpdate\Utilities', 'include_file' ], [ 'page-admin-settings.php' ] ); + $this->assertNotEmpty( $output ); + } +}