PHPUnit > execute tests in random order

This commit is contained in:
Meritoo
2019-04-03 15:06:05 +02:00
parent 9f2a5294a8
commit 92e607a3f0
4 changed files with 51 additions and 25 deletions

View File

@@ -60,6 +60,15 @@ class UriTest extends BaseTestCase
*/
public function testReplenishProtocol($expected, $url, $protocol = '')
{
/*
* Required to get protocol when it's not provided and to void test failure:
*
* Failed asserting that two strings are identical.
* Expected :'://test'
* Actual :'http://test'
*/
$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
self::assertSame($expected, Uri::replenishProtocol($url, $protocol));
}
@@ -251,7 +260,7 @@ class UriTest extends BaseTestCase
public function provideUrlToReplenishProtocol()
{
yield[
'://test',
'http://test',
'test',
'',
];