diff --git a/Assets/Mirror/Tests/Editor/NetworkServerTest.cs b/Assets/Mirror/Tests/Editor/NetworkServerTest.cs index 44825ed67..df575271a 100644 --- a/Assets/Mirror/Tests/Editor/NetworkServerTest.cs +++ b/Assets/Mirror/Tests/Editor/NetworkServerTest.cs @@ -396,15 +396,14 @@ public void OnDataReceivedInvalidConnectionId() [Test] public void SetClientReadyAndNotReady() { - LocalConnectionToClient connection = new LocalConnectionToClient(); - connection.connectionToServer = new LocalConnectionToServer(); - Assert.That(connection.isReady, Is.False); + CreateLocalConnectionPair(out LocalConnectionToClient connectionToClient, out _); + Assert.That(connectionToClient.isReady, Is.False); - NetworkServer.SetClientReady(connection); - Assert.That(connection.isReady, Is.True); + NetworkServer.SetClientReady(connectionToClient); + Assert.That(connectionToClient.isReady, Is.True); - NetworkServer.SetClientNotReady(connection); - Assert.That(connection.isReady, Is.False); + NetworkServer.SetClientNotReady(connectionToClient); + Assert.That(connectionToClient.isReady, Is.False); } [Test]