createMock(TTransport::class); $factory = new TBinaryProtocolFactory($strictRead, $strictWrite); $protocol = $factory->getProtocol($transport); $this->assertInstanceOf(TBinaryProtocol::class, $protocol); $this->assertEquals($strictRead, $this->getPropertyValue($protocol, 'strictRead_')); $this->assertEquals($strictWrite, $this->getPropertyValue($protocol, 'strictWrite_')); $this->assertSame($transport, $this->getPropertyValue($protocol, 'trans_')); } public function getProtocolDataProvider() { yield 'allTrue' => [ 'strictRead' => true, 'strictWrite' => true, ]; yield 'allFalse' => [ 'strictRead' => false, 'strictWrite' => false, ]; yield 'strictReadTrue' => [ 'strictRead' => true, 'strictWrite' => false, ]; yield 'strictWriteTrue' => [ 'strictRead' => false, 'strictWrite' => true, ]; } }