/** * @todo Implement testGet(). */ public function testGet() { if (extension_loaded('bcmath')) { $result = $this->object->get(new \ReflectionExtension('bcmath')); $this->assertType('PharFileInfo', $result); } if (extension_loaded('bz2')) { $result = $this->object->get(new \ReflectionExtension('bcmath')); $this->assertType('PharFileInfo', $result); } $result = $this->object->get(new \ReflectionExtension('spl')); $this->assertType('PharFileInfo', $result); // Remove the following lines when you implement this test. }
#!/usr/bin/env php <?php /** * An simple script to search for manual pages... */ error_reporting(E_ALL); ini_set('include_path', __DIR__ . '/../src' . PATH_SEPARATOR . ini_get('include_path')); require_once 'PHPUnit/Framework.php'; require_once 'Explorer/Manual/Manual.php'; if ($argc != 2) { die("Usage: {$argv['0']} expression\n"); } $manuals = new Explorer\Manual\Manual(__DIR__ . '/../data', 'en'); $s = $manuals->searchFulltext($argv[1], true); foreach ($s as $title => $search) { echo $title, "\n"; foreach ($search as $result) { echo $result->getPathname(), "\n"; } }
#!/usr/bin/env php <?php /** * An simple script to check the manual for missing stuff */ error_reporting(E_ALL); ini_set('include_path', __DIR__ . '/../src' . PATH_SEPARATOR . ini_get('include_path')); require_once 'Explorer/Manual/Manual.php'; $missing_ext = $missing_func = $missing_class = $missing_method = 0; $manuals = new Explorer\Manual\Manual(__DIR__ . '/../data', 'en'); foreach (get_loaded_extensions() as $ext) { try { $manuals->get(new ReflectionExtension($ext)); } catch (Explorer\Manual\ManualPageNotFoundException $e) { echo "missing extension: {$ext}\n"; $missing_ext++; } } $funcs = get_defined_functions(); foreach ($funcs['internal'] as $func) { try { $manuals->get(new ReflectionFunction($func)); } catch (Explorer\Manual\ManualPageNotFoundException $e) { echo "missing function: {$func}\n"; $missing_func++; } } foreach (get_declared_classes() as $c) { $rc = new ReflectionClass($c); if (!$rc->isInternal()) { continue;