tarantool-php /
client
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * This file is part of the tarantool/client package. |
||
| 5 | * |
||
| 6 | * (c) Eugene Leonovich <[email protected]> |
||
| 7 | * |
||
| 8 | * For the full copyright and license information, please view the LICENSE |
||
| 9 | * file that was distributed with this source code. |
||
| 10 | */ |
||
| 11 | |||
| 12 | declare(strict_types=1); |
||
| 13 | |||
| 14 | namespace Tarantool\Client\Tests\Integration\Connection; |
||
| 15 | |||
| 16 | use Tarantool\Client\Keys; |
||
| 17 | use Tarantool\Client\Packer\PacketLength; |
||
| 18 | use Tarantool\Client\Tests\Integration\TestCase; |
||
| 19 | |||
| 20 | final class WriteTest extends TestCase |
||
| 21 | { |
||
| 22 | public function testSendMalformedRequest() : void |
||
| 23 | { |
||
| 24 | $handler = $this->client->getHandler(); |
||
|
0 ignored issues
–
show
|
|||
| 25 | $conn = $handler->getConnection(); |
||
| 26 | |||
| 27 | $data = 'malformed'; |
||
| 28 | $data = PacketLength::pack(strlen($data)).$data; |
||
| 29 | |||
| 30 | $conn->open(); |
||
| 31 | $data = $conn->send($data); |
||
| 32 | |||
| 33 | $response = $handler->getPacker()->unpack($data); |
||
| 34 | |||
| 35 | self::assertTrue($response->isError()); |
||
| 36 | self::assertSame('Invalid MsgPack - packet header', $response->getBodyField(Keys::ERROR_24)); |
||
| 37 | } |
||
| 38 | } |
||
| 39 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.