From 8c05486740ddab2af54221bf7fdc9998cc62609c Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Tue, 30 Apr 2013 21:30:16 -0400 Subject: [PATCH] [Server] Full coverage on flash --- .../Tests/Server/FlashPolicyComponentTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/Ratchet/Tests/Server/FlashPolicyComponentTest.php b/tests/Ratchet/Tests/Server/FlashPolicyComponentTest.php index 15fb45d..60088b4 100644 --- a/tests/Ratchet/Tests/Server/FlashPolicyComponentTest.php +++ b/tests/Ratchet/Tests/Server/FlashPolicyComponentTest.php @@ -137,4 +137,16 @@ class FlashPolicyTest extends \PHPUnit_Framework_TestCase { $this->_policy->onMessage($conn, ' '); } + + public function testOnOpenExists() { + $this->assertTrue(method_exists($this->_policy, 'onOpen')); + $conn = $this->getMock('\Ratchet\ConnectionInterface'); + $this->_policy->onOpen($conn); + } + + public function testOnCloseExists() { + $this->assertTrue(method_exists($this->_policy, 'onClose')); + $conn = $this->getMock('\Ratchet\ConnectionInterface'); + $this->_policy->onClose($conn); + } } \ No newline at end of file