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

Commit

Permalink
Updated to move new tests into separate test case
Browse files Browse the repository at this point in the history
  • Loading branch information
carnage authored and Chris Riley committed Mar 11, 2015
1 parent 4106d85 commit 88a0d12
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions tests/ZendTest/Form/Annotation/AnnotationBuilderTest.php
Expand Up @@ -225,7 +225,7 @@ public function testOptionsAnnotationAndComposedObjectAnnotation($childName)

$child = $form->get($childName);

$target = ($child instanceof Collection)? $child->getTargetElement() : $child;
$target = $child->getTargetElement();
$this->assertInstanceOf('Zend\Form\FieldsetInterface', $target);
$this->assertEquals('My label', $child->getLabel());
}
Expand All @@ -237,7 +237,35 @@ public function testOptionsAnnotationAndComposedObjectAnnotation($childName)
*/
public function provideOptionsAnnotationAndComposedObjectAnnotation()
{
return array(array('child'), array('childTheSecond'), array('childTheThird'), array('childTheFourth'));
return array(array('child'), array('childTheSecond'));
}

/**
* @dataProvider provideOptionsAnnotationAndComposedObjectAnnotationNoneCollection
* @param string $childName
*
* @group 7108
*/
public function testOptionsAnnotationAndComposedObjectAnnotationNoneCollection($childName)
{
$entity = new TestAsset\Annotation\EntityUsingComposedObjectAndOptions();
$builder = new Annotation\AnnotationBuilder();
$form = $builder->createForm($entity);

$child = $form->get($childName);

$this->assertInstanceOf('Zend\Form\FieldsetInterface', $child);
$this->assertEquals('My label', $child->getLabel());
}

/**
* Data provider
*
* @return string[][]
*/
public function provideOptionsAnnotationAndComposedObjectAnnotationNoneCollection()
{
return array(array('childTheThird'), array('childTheFourth'));
}

public function testCanHandleOptionsAnnotation()
Expand Down

0 comments on commit 88a0d12

Please sign in to comment.