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) use ($rootDirectory, $resources) { return str_replace($rootDirectory, '', realpath($resource[1])); }, $resources);
|
||||
$files = array_map(function($resource) { return realpath($resource[1]); }, $resources);
|
||||
$ref = new \ReflectionClass('Symfony\Component\Validator\Validator');
|
||||
$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,
|
||||
'->registerTranslatorConfiguration() finds Validator translation resources'
|
||||
);
|
||||
$ref = new \ReflectionClass('Symfony\Component\Form\Form');
|
||||
$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,
|
||||
'->registerTranslatorConfiguration() finds Form translation resources'
|
||||
);
|
||||
$ref = new \ReflectionClass('Symfony\Component\Security\Core\SecurityContext');
|
||||
$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,
|
||||
'->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');
|
||||
|
||||
$xmlFiles = $container->getParameter('validator.mapping.loader.xml_files_loader.mapping_files');
|
||||
$ref = new \ReflectionClass('Symfony\Component\Form\Form');
|
||||
$this->assertContains(
|
||||
realpath(__DIR__.'/../../../../Component/Form/Resources/config/validation.xml'),
|
||||
realpath(dirname($ref->getFileName()).'/Resources/config/validation.xml'),
|
||||
array_map('realpath', $xmlFiles),
|
||||
'->registerValidationConfiguration() adds Form validation.xml to XML loader'
|
||||
);
|
||||
|
|
|
@ -27,6 +27,11 @@ while ($dir !== $lastDir) {
|
|||
break;
|
||||
}
|
||||
|
||||
if (file_exists($dir.'/vendor/autoload.php')) {
|
||||
require_once $dir.'/vendor/autoload.php';
|
||||
break;
|
||||
}
|
||||
|
||||
$dir = dirname($dir);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,20 +17,23 @@
|
|||
],
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"symfony/dependency-injection" : "~2.0",
|
||||
"symfony/dependency-injection" : "~2.2",
|
||||
"symfony/config" : "~2.2",
|
||||
"symfony/event-dispatcher": "~2.1",
|
||||
"symfony/http-kernel": "~2.2",
|
||||
"symfony/filesystem": "~2.1",
|
||||
"symfony/http-kernel": "~2.3",
|
||||
"symfony/filesystem": "~2.3",
|
||||
"symfony/routing": "~2.2",
|
||||
"symfony/stopwatch": "~2.2",
|
||||
"symfony/stopwatch": "~2.3",
|
||||
"symfony/templating": "~2.1",
|
||||
"symfony/translation": "~2.2",
|
||||
"symfony/translation": "~2.3",
|
||||
"doctrine/common": "~2.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"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": {
|
||||
"symfony/console": "",
|
||||
|
|
|
@ -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