2016-10-14 03:30:05 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SilverStripe\i18n\Tests\i18nTextCollectorTest;
|
|
|
|
|
2017-03-14 03:20:51 +01:00
|
|
|
use SilverStripe\Core\Manifest\Module;
|
|
|
|
use SilverStripe\Core\Manifest\ModuleLoader;
|
2016-10-14 03:30:05 +02:00
|
|
|
use SilverStripe\Dev\TestOnly;
|
2017-01-18 04:58:48 +01:00
|
|
|
use SilverStripe\i18n\TextCollection\i18nTextCollector;
|
2016-10-14 03:30:05 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Assist with testing of specific protected methods
|
|
|
|
*/
|
|
|
|
class Collector extends i18nTextCollector implements TestOnly
|
|
|
|
{
|
2016-12-16 05:34:21 +01:00
|
|
|
public function resolveDuplicateConflicts_Test($entitiesByModule)
|
|
|
|
{
|
|
|
|
return $this->resolveDuplicateConflicts($entitiesByModule);
|
|
|
|
}
|
|
|
|
|
2017-03-14 03:20:51 +01:00
|
|
|
public function getFileListForModule_Test($modulename)
|
2016-12-16 05:34:21 +01:00
|
|
|
{
|
2017-03-14 03:20:51 +01:00
|
|
|
$module = ModuleLoader::instance()->getManifest()->getModule($modulename);
|
|
|
|
if (!$module) {
|
|
|
|
throw new \BadMethodCallException("No module named {$modulename}");
|
|
|
|
}
|
2016-12-16 05:34:21 +01:00
|
|
|
return $this->getFileListForModule($module);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getConflicts_Test($entitiesByModule)
|
|
|
|
{
|
|
|
|
return $this->getConflicts($entitiesByModule);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function findModuleForClass_Test($class)
|
|
|
|
{
|
|
|
|
return $this->findModuleForClass($class);
|
|
|
|
}
|
2016-10-14 03:30:05 +02:00
|
|
|
}
|