[DependencyInjection] changed some tests to use a data provider
This commit is contained in:
parent
75d8337542
commit
264e5888f4
@ -24,25 +24,10 @@ class CrossCheckTest extends \PHPUnit_Framework_TestCase
|
||||
require_once self::$fixturesPath.'/includes/foo.php';
|
||||
}
|
||||
|
||||
public function testCrossCheck()
|
||||
{
|
||||
// cross-check loaders/dumpers
|
||||
|
||||
$fixtures = array(
|
||||
'services1.xml' => 'xml',
|
||||
'services2.xml' => 'xml',
|
||||
'services6.xml' => 'xml',
|
||||
'services8.xml' => 'xml',
|
||||
'services9.xml' => 'xml',
|
||||
|
||||
'services1.yml' => 'yaml',
|
||||
'services2.yml' => 'yaml',
|
||||
'services6.yml' => 'yaml',
|
||||
'services8.yml' => 'yaml',
|
||||
'services9.yml' => 'yaml',
|
||||
);
|
||||
|
||||
foreach ($fixtures as $fixture => $type)
|
||||
/**
|
||||
* @dataProvider crossCheckLoadersDumpers
|
||||
*/
|
||||
public function testCrossCheck($fixture, $type)
|
||||
{
|
||||
$loaderClass = 'Symfony\\Components\\DependencyInjection\\Loader\\'.ucfirst($type).'FileLoader';
|
||||
$dumperClass = 'Symfony\\Components\\DependencyInjection\\Dumper\\'.ucfirst($type).'Dumper';
|
||||
@ -82,5 +67,21 @@ class CrossCheckTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertEquals($services2, $services1, 'Iterator on the containers returns the same services');
|
||||
}
|
||||
|
||||
public function crossCheckLoadersDumpers()
|
||||
{
|
||||
return array(
|
||||
array('services1.xml', 'xml'),
|
||||
array('services2.xml', 'xml'),
|
||||
array('services6.xml', 'xml'),
|
||||
array('services8.xml', 'xml'),
|
||||
array('services9.xml', 'xml'),
|
||||
|
||||
array('services1.yml', 'yaml'),
|
||||
array('services2.yml', 'yaml'),
|
||||
array('services6.yml', 'yaml'),
|
||||
array('services8.yml', 'yaml'),
|
||||
array('services9.yml', 'yaml'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user