Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit b1dc793

Browse files
committed
[TEST] Add a test case for the traversable options for bitwise validator
1 parent 45e7f9b commit b1dc793

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/BitwiseTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,23 @@ public function testConstruct(array $args, array $options)
3838
$this->assertSame($options['operator'], $validator->getOperator());
3939
$this->assertSame($options['strict'], $validator->getStrict());
4040
}
41+
/**
42+
* @covers \Zend\Validator\Bitwise::__construct()
43+
* @dataProvider constructDataProvider
44+
*
45+
* @param array $args
46+
* @param array $options
47+
*/
48+
public function testConstructWithTravesableOptions(array $args, array $options)
49+
{
50+
$validator = new Bitwise(
51+
new \ArrayObject($args)
52+
);
53+
54+
$this->assertSame($options['control'], $validator->getControl());
55+
$this->assertSame($options['operator'], $validator->getOperator());
56+
$this->assertSame($options['strict'], $validator->getStrict());
57+
}
4158

4259
public function constructDataProvider()
4360
{

0 commit comments

Comments
 (0)