Files
Phraseanet/tests/classes/unitTestsTest.php
Romain Neutron ecf516406a Merge branch '3.8'
Conflicts:
	lib/Alchemy/Phrasea/Application.php
	lib/Alchemy/Phrasea/Controller/Admin/Users.php
	lib/Alchemy/Phrasea/Setup/Version/Migration/Migration38.php
	tests/classes/PhraseanetPHPUnitAbstract.php
	tests/classes/unitTestsTest.php
2013-12-19 10:31:52 +01:00

33 lines
1.1 KiB
PHP

<?php
class unitTestsTest extends \PhraseanetTestCase
{
public function testFiles()
{
$reserved = [
"BoilerPlate.php",
"PhraseanetTestCase.php",
"PhraseanetWebTestCase.php",
"PhraseanetAuthenticatedTestCase.php",
"PhraseanetAuthenticatedWebTestCase.php",
"PhraseanetPHPUnitListener.php",
"PDOMock.php",
"CsrfTestProvider.php",
];
$testDir = __DIR__ . '/';
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($testDir), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
if (strpos($file, '/.svn/') !== false)
continue;
if (substr($file->getFilename(), 0, 1) === '.')
continue;
if (substr($file->getFilename(), -4) !== '.php')
continue;
if (in_array($file->getFilename(), $reserved))
continue;
$this->assertRegExp('/[a-zA-Z0-9-_\.]+Test(Case)?.php/', $file->getPathname(), 'Verify that all tests files names');
}
}
}