Tests are now compliant with php-cs-fixer (CamelCase for method, phpdoc valid)
This commit is contained in:
@@ -1,26 +1,29 @@
|
||||
<?php
|
||||
|
||||
/** DomFramework - Tests
|
||||
* @package domframework
|
||||
* @author Dominique Fournier <dominique@fournier38.fr>
|
||||
* @license BSD
|
||||
*/
|
||||
/**
|
||||
* DomFramework - Tests
|
||||
* @package domframework
|
||||
* @author Dominique Fournier <dominique@fournier38.fr>
|
||||
* @license BSD
|
||||
*/
|
||||
|
||||
namespace Domframework\Tests;
|
||||
|
||||
use Domframework\Sse;
|
||||
|
||||
/** Test the domframework Server-Sent Events part */
|
||||
/**
|
||||
* Test the domframework Server-Sent Events part
|
||||
*/
|
||||
class SseTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function test_loop_NOTDEFINED()
|
||||
public function testLoopNOTDEFINED()
|
||||
{
|
||||
$this->expectException("Exception");
|
||||
$sse = new Sse();
|
||||
$res = $sse->loop();
|
||||
}
|
||||
|
||||
public function test_loop_JUSTPING()
|
||||
public function testLoopJUSTPING()
|
||||
{
|
||||
$this->expectOutputString(str_repeat(": ping\n\n", 5));
|
||||
$sse = new Sse();
|
||||
@@ -32,7 +35,7 @@ class SseTest extends \PHPUnit_Framework_TestCase
|
||||
$sse->loop();
|
||||
}
|
||||
|
||||
public function test_loop_SKIP_START()
|
||||
public function testLoopSKIPSTART()
|
||||
{
|
||||
$this->expectOutputString(str_repeat(": ping\n\n", 5));
|
||||
$sse = new Sse();
|
||||
@@ -45,7 +48,7 @@ class SseTest extends \PHPUnit_Framework_TestCase
|
||||
$sse->loop();
|
||||
}
|
||||
|
||||
public function test_loop_DATA()
|
||||
public function testLoopDATA()
|
||||
{
|
||||
$this->expectOutputString(str_repeat(": ping\n\n", 4) .
|
||||
"data: WILL BE SEEN\n\n: ping\n\n");
|
||||
@@ -62,7 +65,7 @@ class SseTest extends \PHPUnit_Framework_TestCase
|
||||
$sse->loop();
|
||||
}
|
||||
|
||||
public function test_loop_EVENTS()
|
||||
public function testLoopEVENTS()
|
||||
{
|
||||
$this->expectOutputString(str_repeat(": ping\n\n", 4) .
|
||||
"event: event1\ndata: WILL BE SEEN 1\n\n" .
|
||||
@@ -86,7 +89,7 @@ class SseTest extends \PHPUnit_Framework_TestCase
|
||||
$sse->loop();
|
||||
}
|
||||
|
||||
public function test_loop_HandlersEvent()
|
||||
public function testLoopHandlersEvent()
|
||||
{
|
||||
$this->expectOutputString(str_repeat(": ping\n\n", 4) .
|
||||
"event: event1\ndata: will be seen 1\n\n" .
|
||||
@@ -116,7 +119,7 @@ class SseTest extends \PHPUnit_Framework_TestCase
|
||||
$sse->loop();
|
||||
}
|
||||
|
||||
public function test_loop_HandlerDataonly()
|
||||
public function testLoopHandlerDataonly()
|
||||
{
|
||||
$this->expectOutputString(str_repeat(": ping\n\n", 4) .
|
||||
"data: will be seen 1\n\n" .
|
||||
@@ -139,7 +142,7 @@ class SseTest extends \PHPUnit_Framework_TestCase
|
||||
$sse->loop();
|
||||
}
|
||||
|
||||
public function test_loop_HandlerDataonlyWithParams()
|
||||
public function testLoopHandlerDataonlyWithParams()
|
||||
{
|
||||
$this->expectOutputString(str_repeat(": ping\n\n", 4) .
|
||||
"data: PREwill be seen 1POST\n\n" .
|
||||
|
||||
Reference in New Issue
Block a user