Skip to content

Commit

Permalink
Merge pull request #567 from adam187/option-resolver-is-defined
Browse files Browse the repository at this point in the history
use isDefined method for OptionsResolver instead of isKnown  (when possible)
  • Loading branch information
makasim committed Feb 28, 2015
2 parents a97b46f + f0d340a commit e58ba83
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Tests/Form/Type/ImageTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ public function testSetDefaultOptions()
$this->assertTrue($resolver->isRequired('image_path'));
$this->assertTrue($resolver->isRequired('image_filter'));

$this->assertTrue($resolver->isKnown('image_attr'));
$this->assertTrue($resolver->isKnown('link_url'));
$this->assertTrue($resolver->isKnown('link_filter'));
$this->assertTrue($resolver->isKnown('link_attr'));
$isDefinedMethod = method_exists($resolver, 'isDefined') ? 'isDefined' : 'isKnown';
$this->assertTrue($resolver->$isDefinedMethod('image_attr'));
$this->assertTrue($resolver->$isDefinedMethod('link_url'));
$this->assertTrue($resolver->$isDefinedMethod('link_filter'));
$this->assertTrue($resolver->$isDefinedMethod('link_attr'));
}

public function testBuildView()
Expand Down

0 comments on commit e58ba83

Please sign in to comment.