예제 #1
0
 public function testBuildForm()
 {
     $test = $this;
     $this->reg->expects($this->once())->method('getManager')->with(null)->will($this->returnValue($this->dm));
     $this->builder->expects($this->once())->method('addModelTransformer')->will($this->returnCallback(function ($transformer) use($test) {
         $test->assertInstanceOf('Doctrine\\Bundle\\PHPCRBundle\\Form\\DataTransformer\\DocumentToPathTransformer', $transformer);
         return;
     }));
     $this->type->buildForm($this->builder, array('manager_name' => null));
 }
예제 #2
0
 public function testSetDefaultOptions()
 {
     $this->optionsResolver->expects($this->once())->method('setDefaults')->with(array('manager_name' => null));
     $this->type->setDefaultOptions($this->optionsResolver);
 }