Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | public function testOptions() |
||
8 | { |
||
9 | $configuration = [ |
||
10 | 'name' => 'test-name', |
||
11 | 'type' => 'type-name', |
||
12 | 'passive' => true, |
||
13 | 'durable' => true, |
||
14 | 'auto_delete' => false, |
||
15 | 'internal' => true, |
||
16 | 'no_wait' => true, |
||
17 | 'arguments' => [ |
||
18 | 'argument1' => 'value1', |
||
19 | ], |
||
20 | ]; |
||
21 | $options = new ExchangeOptions(); |
||
22 | $options->setFromArray($configuration); |
||
23 | |||
24 | static::assertEquals($configuration['name'], $options->getName()); |
||
25 | static::assertEquals($configuration['type'], $options->getType()); |
||
26 | static::assertEquals($configuration['passive'], $options->isPassive()); |
||
27 | static::assertEquals($configuration['durable'], $options->isDurable()); |
||
28 | static::assertEquals($configuration['auto_delete'], $options->isAutoDelete()); |
||
29 | static::assertEquals($configuration['internal'], $options->isInternal()); |
||
30 | static::assertEquals($configuration['no_wait'], $options->isNoWait()); |
||
31 | static::assertEquals($configuration['arguments'], $options->getArguments()); |
||
32 | } |
||
33 | } |
||
34 |