* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Validator\Tests\Mapping\Loader; use PHPUnit\Framework\TestCase; use Symfony\Component\Validator\Mapping\ClassMetadata; use Symfony\Component\Validator\Mapping\Loader\LoaderInterface; class FilesLoaderTest extends TestCase { public function testCallsGetFileLoaderInstanceForeachPath() { $loader = $this->getFilesLoader($this->getFileLoader()); $this->assertEquals(4, $loader->getTimesCalled()); } public function testCallsActualFileLoaderForMetadata() { $fileLoader = $this->getFileLoader(); $fileLoader->expects($this->exactly(4)) ->method('loadClassMetadata'); $loader = $this->getFilesLoader($fileLoader); $loader->loadClassMetadata(new ClassMetadata('Symfony\Component\Validator\Tests\Fixtures\Entity')); } public function getFilesLoader(LoaderInterface $loader) { return $this->getMockForAbstractClass('Symfony\Component\Validator\Tests\Fixtures\FilesLoader', array(array( __DIR__.'/constraint-mapping.xml', __DIR__.'/constraint-mapping.yaml', __DIR__.'/constraint-mapping.test', __DIR__.'/constraint-mapping.txt', ), $loader)); } public function getFileLoader() { return $this->getMockBuilder('Symfony\Component\Validator\Mapping\Loader\LoaderInterface')->getMock(); } } __halt_compiler();----SIGNATURE:----exCY2JEw1VdxmaXjCuMr1lDYOwfnl6FwHCOImhCL8jfMUfwq3q3KlsFrkXAx5EQVCL4XlTa4lwEcktXvw1HwYzEQ1fnPwL3t7WtwGvjPtlxCCKC95UlEX6QAj1qp42Q9qwzxi30InhEWuy1ABZe0T4RHzVpIlyFPPrva/c9ZP8RcI1y+qrRm4udY7tDebeI33B9kveTzWL9LVB1E2v1E/56vJViRd6fFRhS5L2Q3He3D1EYGKyHD5EoWLlMJLwM2UZ/YNz2E7SdEyuToa+/s8UU0ndM1pQ0lZ0twZVlkE7QxhpLR9KOrudOBAioK9cYbfJNpPWjRjsStv+ztCkQKPff9+k5ZHGklIXnWRy3lRsW3CWqiZphf5EZJHpXO4RtOk+nGIeAic2l26wbwK7HVuCSA4kLyeU6nMu+8jVk9dNjZBZ79rSlDDHaTUqyM7E+DcJO7GacmwkcbwLrED7vRLDsQz4GlslY37Zb+BN+Kr2+PJ6DK1Cq47qEBavNY6ERbSRKnpLXLBNWfWs7LdCF/KUqJslVYN2YDaXWqSWDih8h2bvi5NkKYkQial19eV3IYGVfyvYKA5/o1UKQ2ogPBtEgvsuYhZ6hMrPstp036Cb3qezk5TQgxqigdIAIFanEt+aakVRqnWSflO/2wnrQoYkU375ZzQNJmolAjgQtSULA=----ATTACHMENT:----NjQzMjgyOTA3MzAxMDc4OSA3MDYwNDc5MDA5OTU5NjE4IDYyMTcyMzgyOTgxMzA1NDI=