* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Validator\ValidatorBuilder; use Symfony\Component\Validator\ValidatorBuilderInterface; class ValidatorBuilderTest extends TestCase { /** * @var ValidatorBuilderInterface */ protected $builder; protected function setUp() { $this->builder = new ValidatorBuilder(); } protected function tearDown() { $this->builder = null; } public function testAddObjectInitializer() { $this->assertSame($this->builder, $this->builder->addObjectInitializer( $this->getMockBuilder('Symfony\Component\Validator\ObjectInitializerInterface')->getMock() )); } public function testAddObjectInitializers() { $this->assertSame($this->builder, $this->builder->addObjectInitializers(array())); } public function testAddXmlMapping() { $this->assertSame($this->builder, $this->builder->addXmlMapping('mapping')); } public function testAddXmlMappings() { $this->assertSame($this->builder, $this->builder->addXmlMappings(array())); } public function testAddYamlMapping() { $this->assertSame($this->builder, $this->builder->addYamlMapping('mapping')); } public function testAddYamlMappings() { $this->assertSame($this->builder, $this->builder->addYamlMappings(array())); } public function testAddMethodMapping() { $this->assertSame($this->builder, $this->builder->addMethodMapping('mapping')); } public function testAddMethodMappings() { $this->assertSame($this->builder, $this->builder->addMethodMappings(array())); } public function testEnableAnnotationMapping() { $this->assertSame($this->builder, $this->builder->enableAnnotationMapping()); } public function testDisableAnnotationMapping() { $this->assertSame($this->builder, $this->builder->disableAnnotationMapping()); } public function testSetMetadataCache() { $this->assertSame($this->builder, $this->builder->setMetadataCache( $this->getMockBuilder('Symfony\Component\Validator\Mapping\Cache\CacheInterface')->getMock()) ); } public function testSetConstraintValidatorFactory() { $this->assertSame($this->builder, $this->builder->setConstraintValidatorFactory( $this->getMockBuilder('Symfony\Component\Validator\ConstraintValidatorFactoryInterface')->getMock()) ); } public function testSetTranslator() { $this->assertSame($this->builder, $this->builder->setTranslator( $this->getMockBuilder('Symfony\Component\Translation\TranslatorInterface')->getMock()) ); } public function testSetTranslationDomain() { $this->assertSame($this->builder, $this->builder->setTranslationDomain('TRANS_DOMAIN')); } public function testGetValidator() { $this->assertInstanceOf('Symfony\Component\Validator\Validator\RecursiveValidator', $this->builder->getValidator()); } } __halt_compiler();----SIGNATURE:----m3nNVRUxy0cPnajD9qUutg9a5B3hqXv8kCb3kcuiTycHqKLBmiGnfWzuuECqUftGen8UEwKvF7TMtKukzRXK2u2Lt4xh79KGKPCgV4r5vuClyag/HW1SPqX7bsLPQCOIwfscuUR3uJAkk8mKeea/0cDBEpzNFVOn8Y7b8jcCIKeRGwl8ScyzcjbKfvJMtUJqPx9cWP5mRktdZPt9fFyTy14DyUePLF56GM+nv9jvaIRSjfdqbgdInIrz94Ugt3+kBlDyUnjlqyGCd6D71Lk9MFJXp6aNS2cqlyL+Rfn+wYpLgjVMULyE1WXQgHePKQVl/wLT2hXgI/e0HxuRMCCLATJSbOnPcV2fx7YK0dSUlOfCxWUlKeEPdKmBkcdBobxLc3f5ESSBXAwhI7kGyxjC4NTpuSeIkW/NIJLveHDhSbakH6fvQRZ9u54oMEJv9UjlvOwVoazqPKZ+GtYJzvU4c/z+czpbu9n8cczAUpsu9uVcSFEvpE2MF1inFngvNoj5sYGbSLWKrio4Ya5SiphTU/InsM3ot1b+Smze4JtKVQGvD3X/ONXTYx3B4hBueT1c0WTP0GOX5zAOaz+smzQpdVeOnuXrGC5uxxsA7Cbl0uLHt2tzVYzkSIlVQZrCA66IaiT6dxJflofyevHT5vBuCqtleR3SLHrkOLCD/yWIHgY=----ATTACHMENT:----MjczMTUxODQ2MTcyNDEzNyA1Nzk1MzI0NTI4NDc0ODg5IDc1MDg5MzgyMDQ3Nzk0Mw==