From 04875dadcd13dbbef9afa202029a75fed5af0476 Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Sun, 4 Sep 2011 20:47:43 -0400 Subject: [PATCH] Unit testing coverage --- .gitignore | 2 ++ lib/Ratchet/Protocol/ProtocolInterface.php | 5 ++-- lib/Ratchet/Protocol/WebSocket/Server.php | 5 +++- .../Tests/Protocol/WebSocket/ServerTest.php | 26 +++++++++++++++++++ 4 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 .gitignore create mode 100644 tests/Ratchet/Tests/Protocol/WebSocket/ServerTest.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..eefacf1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +phpunit.xml +coverage \ No newline at end of file diff --git a/lib/Ratchet/Protocol/ProtocolInterface.php b/lib/Ratchet/Protocol/ProtocolInterface.php index 35f0048..145530d 100644 --- a/lib/Ratchet/Protocol/ProtocolInterface.php +++ b/lib/Ratchet/Protocol/ProtocolInterface.php @@ -1,7 +1,6 @@ _server = $server; } + + public function run() { + } } \ No newline at end of file diff --git a/tests/Ratchet/Tests/Protocol/WebSocket/ServerTest.php b/tests/Ratchet/Tests/Protocol/WebSocket/ServerTest.php new file mode 100644 index 0000000..08cbf2f --- /dev/null +++ b/tests/Ratchet/Tests/Protocol/WebSocket/ServerTest.php @@ -0,0 +1,26 @@ +_server = new WebServer(new Server(new Socket())); + } + + public function testServerImplementsServerInterface() { + $constraint = $this->isInstanceOf('\\Ratchet\\ServerInterface'); + $this->assertThat($this->_server, $constraint); + } + + public function testServerImplementsProtocolInterface() { + $constraint = $this->isInstanceOf('\\Ratchet\\Protocol\ProtocolInterface'); + $this->assertThat($this->_server, $constraint); + } +} \ No newline at end of file