public function testShutdown() { $this->client->send('bbb'); $this->assertSame('bbb', $this->client->receive(3)); $this->assertFalse($this->client->shutdown('undefined direction')); $this->assertTrue($this->client->shutdown(Stream::DIRECTION_SEND)); try { $this->client->send('b'); $this->fail('Sending had to fail.'); } catch (SocketException $e) { $this->assertSame(3, $e->getCode(), 'Improper exception code.'); } }