assertInstanceOf($expectedTransport, $protocol->getTransport()); } public function constructDataProvider() { yield 'not buffered transport' => [ 'transport' => new TMemoryBuffer(), 'expectedTransport' => TMemoryBuffer::class, ]; yield 'buffered transport' => [ 'transport' => new TSocket(), 'expectedTransport' => TBufferedTransport::class, ]; } /** * @dataProvider strictParamsDataProvider */ public function testStrictParams($strictRead, $strictWrite) { $protocol = new TBinaryProtocolAccelerated(new TMemoryBuffer(), $strictRead, $strictWrite); $this->assertEquals($strictRead, $protocol->isStrictRead()); $this->assertEquals($strictWrite, $protocol->isStrictWrite()); } public function strictParamsDataProvider() { yield 'strict read and write' => [true, true]; yield 'not strict read and write' => [false, false]; yield 'strict read and not strict write' => [true, false]; yield 'not strict read and strict write' => [false, true]; } }