/** * Lists available converters. */ protected function _listConverters() { $Package = new Transformist_Package(TRANSFORMIST_ROOT); $classes = $Package->classes(array('Transformist', 'Converter'), true); foreach ($classes as $className) { if (class_exists($className)) { $Reflection = new ReflectionClass($className); if (!$Reflection->isAbstract()) { $this->_converters[$className] = null; // for lazy load } } } }
/** * Constructs and returns a test suite covering all available tests cases. * * @return PHPUnit_Framework_TestSuite Suite. */ public static function suite() { $Suite = new PHPUnit_Framework_TestSuite(); $Package = new Transformist_Package(self::$_path); $tests = $Package->classes(array('Transformist'), true); if (empty($tests)) { self::_output('No case found.'); } else { self::_output('Found %d cases :', count($tests)); foreach ($tests as $test) { self::_output('- ' . $test); $Suite->addTestSuite($test); } } self::_output(''); return $Suite; }
/** * */ public function testSeparator() { $Package = new Transformist_Package('foo', '\\'); $this->assertEquals('\\', $Package->separator()); }