In this recipe, you added two scenes to the build so that they can be selected in our scripts using SceneManager during PlayMode testing.
We opened menuScene so that we can clearly see when Unity runs different scenes during our PlayMode testing – and we'll see the menu scene reopened after testing takes place.
There is a SetUp() method that is executed before each test. The SetUp() and TearDown() methods are very useful for preparing things before each test and resetting things back to how they were before the test took place. Unfortunately, aspects such as loading our door scene before running each test, and then reloading the menu after each test, involve waiting until the scene load process has completed. We can't place yield statements in our SetUp() and TearDown() methods, so you'll see that each test has repeated scene loading at the beginning and end of each test:
// load scene to be tested
yield return SceneManager.LoadSceneAsync(sceneToTest...