add test case for Zend\Validator\IsInstanceOf to pass Traversable to constructor #5053

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants
@samsonasik
Contributor

samsonasik commented Aug 31, 2013

No description provided.

+
+ public function testPassTraversableToConstructor()
+ {
+ $validator = new Validator\IsInstanceOf(new \ArrayIterator(array('className' => 'DateTime')));

This comment has been minimized.

@Ocramius

Ocramius Aug 31, 2013

Member

Double space?

@Ocramius

Ocramius Aug 31, 2013

Member

Double space?

+ {
+ $validator = new Validator\IsInstanceOf(new \ArrayIterator(array('className' => 'DateTime')));
+ $this->assertEquals('DateTime', $validator->getClassName());
+ $this->assertTrue($validator->isValid(new DateTime()));

This comment has been minimized.

@Ocramius

Ocramius Aug 31, 2013

Member

Should also an invalid instance be tested?

@Ocramius

Ocramius Aug 31, 2013

Member

Should also an invalid instance be tested?

@samsonasik

This comment has been minimized.

Show comment
Hide comment
@samsonasik

samsonasik Aug 31, 2013

Contributor

@Ocramius done ;)

Contributor

samsonasik commented Aug 31, 2013

@Ocramius done ;)

weierophinney added a commit that referenced this pull request Sep 3, 2013

Merge pull request #5053 from samsonasik/add/test.isinstanceof
add test case for Zend\Validator\IsInstanceOf to pass Traversable to constructor

weierophinney added a commit that referenced this pull request Sep 3, 2013

@ghost ghost assigned weierophinney Sep 3, 2013

weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015

Merge pull request zendframework/zendframework#5053 from samsonasik/a…
…dd/test.isinstanceof

add test case for Zend\Validator\IsInstanceOf to pass Traversable to constructor

weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015

weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment