Browse Source

Fix socket tests checking null instead of false for Socket::read()

Corey Taylor 5 years ago
parent
commit
0995a0f37f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tests/TestCase/Network/SocketTest.php

+ 2 - 2
tests/TestCase/Network/SocketTest.php

@@ -180,12 +180,12 @@ class SocketTest extends TestCase
         $this->Socket = new Socket(['timeout' => 5]);
         try {
             $this->Socket->connect();
-            $this->assertNull($this->Socket->read(26));
+            $this->assertFalse($this->Socket->read(26));
 
             $config = ['host' => 'google.com', 'port' => 80, 'timeout' => 1];
             $this->Socket = new Socket($config);
             $this->assertTrue($this->Socket->connect());
-            $this->assertNull($this->Socket->read(26));
+            $this->assertFalse($this->Socket->read(26));
             $this->assertEquals('2: ' . 'Connection timed out', $this->Socket->lastError());
         } catch (SocketException $e) {
             $this->markTestSkipped('Cannot test network, skipping.');