merged branch hason/framework (PR #8061)
This PR was merged into the 2.3 branch.
Discussion
----------
[FrameworkBundle] Added missing files for phpunit
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Commits
-------
815cee5
[FrameworkBundle] Added missing files for phpunit
This commit is contained in:
commit
2398144270
@ -172,20 +172,22 @@ abstract class FrameworkExtensionTest extends TestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$rootDirectory = str_replace('/', DIRECTORY_SEPARATOR, realpath(__DIR__.'/../../../../..').'/');
|
$files = array_map(function($resource) { return realpath($resource[1]); }, $resources);
|
||||||
$files = array_map(function($resource) use ($rootDirectory, $resources) { return str_replace($rootDirectory, '', realpath($resource[1])); }, $resources);
|
$ref = new \ReflectionClass('Symfony\Component\Validator\Validator');
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
str_replace('/', DIRECTORY_SEPARATOR, 'Symfony/Component/Validator/Resources/translations/validators.en.xlf'),
|
strtr(dirname($ref->getFileName()) . '/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR),
|
||||||
$files,
|
$files,
|
||||||
'->registerTranslatorConfiguration() finds Validator translation resources'
|
'->registerTranslatorConfiguration() finds Validator translation resources'
|
||||||
);
|
);
|
||||||
|
$ref = new \ReflectionClass('Symfony\Component\Form\Form');
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
str_replace('/', DIRECTORY_SEPARATOR, 'Symfony/Component/Form/Resources/translations/validators.en.xlf'),
|
strtr(dirname($ref->getFileName()) . '/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR),
|
||||||
$files,
|
$files,
|
||||||
'->registerTranslatorConfiguration() finds Form translation resources'
|
'->registerTranslatorConfiguration() finds Form translation resources'
|
||||||
);
|
);
|
||||||
|
$ref = new \ReflectionClass('Symfony\Component\Security\Core\SecurityContext');
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
str_replace('/', DIRECTORY_SEPARATOR, 'Symfony/Component/Security/Resources/translations/security.en.xlf'),
|
strtr(dirname(dirname($ref->getFileName())) . '/Resources/translations/security.en.xlf', '/', DIRECTORY_SEPARATOR),
|
||||||
$files,
|
$files,
|
||||||
'->registerTranslatorConfiguration() finds Security translation resources'
|
'->registerTranslatorConfiguration() finds Security translation resources'
|
||||||
);
|
);
|
||||||
@ -213,8 +215,9 @@ abstract class FrameworkExtensionTest extends TestCase
|
|||||||
$this->assertTrue($container->hasDefinition('validator.mapping.loader.yaml_files_loader'), '->registerValidationConfiguration() defines the YAML loader');
|
$this->assertTrue($container->hasDefinition('validator.mapping.loader.yaml_files_loader'), '->registerValidationConfiguration() defines the YAML loader');
|
||||||
|
|
||||||
$xmlFiles = $container->getParameter('validator.mapping.loader.xml_files_loader.mapping_files');
|
$xmlFiles = $container->getParameter('validator.mapping.loader.xml_files_loader.mapping_files');
|
||||||
|
$ref = new \ReflectionClass('Symfony\Component\Form\Form');
|
||||||
$this->assertContains(
|
$this->assertContains(
|
||||||
realpath(__DIR__.'/../../../../Component/Form/Resources/config/validation.xml'),
|
realpath(dirname($ref->getFileName()).'/Resources/config/validation.xml'),
|
||||||
array_map('realpath', $xmlFiles),
|
array_map('realpath', $xmlFiles),
|
||||||
'->registerValidationConfiguration() adds Form validation.xml to XML loader'
|
'->registerValidationConfiguration() adds Form validation.xml to XML loader'
|
||||||
);
|
);
|
||||||
|
@ -27,6 +27,11 @@ while ($dir !== $lastDir) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (file_exists($dir.'/vendor/autoload.php')) {
|
||||||
|
require_once $dir.'/vendor/autoload.php';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$dir = dirname($dir);
|
$dir = dirname($dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,20 +17,23 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.3",
|
"php": ">=5.3.3",
|
||||||
"symfony/dependency-injection" : "~2.0",
|
"symfony/dependency-injection" : "~2.2",
|
||||||
"symfony/config" : "~2.2",
|
"symfony/config" : "~2.2",
|
||||||
"symfony/event-dispatcher": "~2.1",
|
"symfony/event-dispatcher": "~2.1",
|
||||||
"symfony/http-kernel": "~2.2",
|
"symfony/http-kernel": "~2.3",
|
||||||
"symfony/filesystem": "~2.1",
|
"symfony/filesystem": "~2.3",
|
||||||
"symfony/routing": "~2.2",
|
"symfony/routing": "~2.2",
|
||||||
"symfony/stopwatch": "~2.2",
|
"symfony/stopwatch": "~2.3",
|
||||||
"symfony/templating": "~2.1",
|
"symfony/templating": "~2.1",
|
||||||
"symfony/translation": "~2.2",
|
"symfony/translation": "~2.3",
|
||||||
"doctrine/common": "~2.2"
|
"doctrine/common": "~2.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/finder": "~2.0",
|
"symfony/finder": "~2.0",
|
||||||
"symfony/security": "~2.2"
|
"symfony/security": "~2.3",
|
||||||
|
"symfony/form": "~2.3",
|
||||||
|
"symfony/class-loader": "~2.1",
|
||||||
|
"symfony/validator": "~2.1"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
"symfony/console": "",
|
"symfony/console": "",
|
||||||
|
30
src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist
Normal file
30
src/Symfony/Bundle/FrameworkBundle/phpunit.xml.dist
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
syntaxCheck="false"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Symfony FrameworkBundle Test Suite">
|
||||||
|
<directory>./Tests/</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<whitelist>
|
||||||
|
<directory>./</directory>
|
||||||
|
<exclude>
|
||||||
|
<directory>./vendor</directory>
|
||||||
|
<directory>./Resources</directory>
|
||||||
|
<directory>./Tests</directory>
|
||||||
|
</exclude>
|
||||||
|
</whitelist>
|
||||||
|
</filter>
|
||||||
|
</phpunit>
|
Reference in New Issue
Block a user