Skip to content

Commit b1a6385

Browse files
authored
Added RingCentral (#26)
1 parent 3a651b5 commit b1a6385

File tree

10 files changed

+89
-0
lines changed

10 files changed

+89
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ env:
1717
- SUITE="Zend"
1818
- SUITE="Slim"
1919
- SUITE="Nyholm"
20+
- SUITE="RingCentral"
2021

2122
branches:
2223
except:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
| Zend | [![Zend](https://travis-matrix-badges.herokuapp.com/repos/php-http/psr7-integration-tests/branches/master/2)](https://travis-ci.org/php-http/psr7-integration-tests) |
1414
| Slim | [![Slim](https://travis-matrix-badges.herokuapp.com/repos/php-http/psr7-integration-tests/branches/master/3)](https://travis-ci.org/php-http/psr7-integration-tests) |
1515
| Nyholm | [![Nyholm](https://travis-matrix-badges.herokuapp.com/repos/php-http/psr7-integration-tests/branches/master/4)](https://travis-ci.org/php-http/psr7-integration-tests) |
16+
| RingCentral | [![RingCentral](https://travis-matrix-badges.herokuapp.com/repos/php-http/psr7-integration-tests/branches/master/5)](https://travis-ci.org/php-http/psr7-integration-tests) |
1617

1718
## Install
1819

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"zendframework/zend-diactoros": "^1.8",
2020
"guzzlehttp/psr7": "^1.4",
2121
"slim/http": "^0.3",
22+
"ringcentral/psr7": "^1.2",
2223
"nyholm/psr7": "dev-master"
2324
},
2425
"autoload": {

phpunit.xml.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
<directory>./tests/Guzzle/</directory>
1616
</testsuite>
1717

18+
<testsuite name="RingCentral">
19+
<directory>./tests/RingCentral/</directory>
20+
</testsuite>
21+
1822
<testsuite name="Slim">
1923
<directory>./tests/Slim/</directory>
2024
</testsuite>

tests/RingCentral/RequestTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Http\Psr7Test\Tests\RingCentral;
4+
5+
use RingCentral\Psr7\Request;
6+
use Http\Psr7Test\RequestIntegrationTest;
7+
8+
class RequestTest extends RequestIntegrationTest
9+
{
10+
public function createSubject()
11+
{
12+
return new Request('GET', '/');
13+
}
14+
}

tests/RingCentral/ResponseTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Http\Psr7Test\Tests\RingCentral;
4+
5+
use RingCentral\Psr7\Response;
6+
use Http\Psr7Test\ResponseIntegrationTest;
7+
8+
class ResponseTest extends ResponseIntegrationTest
9+
{
10+
public function createSubject()
11+
{
12+
return new Response();
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Http\Psr7Test\Tests\RingCentral;
4+
5+
use RingCentral\Psr7\ServerRequest;
6+
use Http\Psr7Test\ServerRequestIntegrationTest;
7+
8+
class ServerRequestTest extends ServerRequestIntegrationTest
9+
{
10+
public function createSubject()
11+
{
12+
return new ServerRequest('GET', '/', [], null, '1.1', $_SERVER);
13+
}
14+
}

tests/RingCentral/StreamTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace Http\Psr7Test\Tests\RingCentral;
4+
5+
use Http\Psr7Test\StreamIntegrationTest;
6+
7+
class StreamTest extends StreamIntegrationTest
8+
{
9+
public function createStream($data)
10+
{
11+
return \RingCentral\Psr7\stream_for($data);
12+
}
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace Http\Psr7Test\Tests\RingCentral;
4+
5+
use Http\Psr7Test\UploadedFileIntegrationTest;
6+
7+
class UploadedFileTest extends UploadedFileIntegrationTest
8+
{
9+
public function createSubject()
10+
{
11+
$this->markTestSkipped('RingCentral does not implement UploadedFileInterface.');
12+
}
13+
}

tests/RingCentral/UriTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
namespace Http\Psr7Test\Tests\RingCentral;
4+
5+
use RingCentral\Psr7\Uri;
6+
use Http\Psr7Test\UriIntegrationTest;
7+
8+
class UriTest extends UriIntegrationTest
9+
{
10+
public function createUri($uri)
11+
{
12+
return new Uri($uri);
13+
}
14+
}

0 commit comments

Comments
 (0)