| 1 | <?php |
||
| 9 | class QosTest extends \PHPUnit_Framework_TestCase |
||
| 10 | { |
||
| 11 | public function testOptions() |
||
| 12 | { |
||
| 13 | $configuration = [ |
||
| 14 | 'prefetch_size' => 7, |
||
| 15 | 'prefetch_count' => 6, |
||
| 16 | 'global' => true, |
||
| 17 | ]; |
||
| 18 | $options = new Qos(); |
||
| 19 | $options->setFromArray($configuration); |
||
| 20 | |||
| 21 | static::assertEquals(7, $options->getPrefetchSize()); |
||
| 22 | static::assertEquals(6, $options->getPrefetchCount()); |
||
| 23 | static::assertTrue($options->isGlobal()); |
||
| 24 | } |
||
| 25 | } |
||
| 26 |