Орла
Области
Компаний
Пользователи
Галерея
Фиксированные новости
Орла
Отзывы о фирмах
Тарифы
Пользователи
Области
Банкоматы
Торговые точки
Доска объявлений
Курсы валют
Скидки
организации Орла
организации области
товары
сайты
сайты Орел
Данные
Разделы
Поиск
Поиск запросы
Статистика
Показы каталога организаций
Статистика клиенты
Пользователи
Сайты
Управление сайтом
Анкета
Аптеки
Афиша
Афиша новая
Баннеры
Бизнес >
Викторина
Голосование
Гость на сайте
Истории
Календарь событий
Каталоги >
Конкурс красоты
Конкурс аудио
Консультации
Меню
Новое на сайте
Новости >
Организации >
Программа ТВ
Публикации
Разделы сайта
Рассылка
Рестораны
Секрет фирмы >
Сервисы >
Ссылки
Тесты
Файловый менеджер
Форум
Фотогалерея
Обратная связь
Недвижимость
Новый год
Тексты
Пользователи
Юридический рейтинг
Отзывы на товары
Бан пользователей
Жалобы
Новые тесты
Коронавирус
Файловый менеджер
Имя файла
PHP.php
Содержимое
<?php /* * This file is part of PHPUnit. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Utility methods for PHP sub-processes. * * @since Class available since Release 3.4.0 */ abstract class PHPUnit_Util_PHP { /** * @return PHPUnit_Util_PHP * * @since Method available since Release 3.5.12 */ public static function factory() { if (DIRECTORY_SEPARATOR == '\\') { return new PHPUnit_Util_PHP_Windows; } return new PHPUnit_Util_PHP_Default; } /** * Runs a single test in a separate PHP process. * * @param string $job * @param PHPUnit_Framework_Test $test * @param PHPUnit_Framework_TestResult $result * * @throws PHPUnit_Framework_Exception */ public function runTestJob($job, PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result) { $result->startTest($test); $_result = $this->runJob($job); $this->processChildResult( $test, $result, $_result['stdout'], $_result['stderr'] ); } /** * Runs a single job (PHP code) using a separate PHP process. * * @param string $job * @param array $settings * * @return array * * @throws PHPUnit_Framework_Exception */ abstract public function runJob($job, array $settings = array()); /** * @param array $settings * * @return string * * @since Method available since Release 4.0.0 */ protected function settingsToParameters(array $settings) { $buffer = ''; foreach ($settings as $setting) { $buffer .= ' -d ' . $setting; } return $buffer; } /** * Processes the TestResult object from an isolated process. * * @param PHPUnit_Framework_Test $test * @param PHPUnit_Framework_TestResult $result * @param string $stdout * @param string $stderr * * @since Method available since Release 3.5.0 */ private function processChildResult(PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result, $stdout, $stderr) { $time = 0; if (!empty($stderr)) { $result->addError( $test, new PHPUnit_Framework_Exception(trim($stderr)), $time ); } else { set_error_handler(function ($errno, $errstr, $errfile, $errline) { throw new ErrorException($errstr, $errno, $errno, $errfile, $errline); }); try { if (strpos($stdout, "#!/usr/bin/env php\n") === 0) { $stdout = substr($stdout, 19); } $childResult = unserialize(str_replace("#!/usr/bin/env php\n", '', $stdout)); restore_error_handler(); } catch (ErrorException $e) { restore_error_handler(); $childResult = false; $result->addError( $test, new PHPUnit_Framework_Exception(trim($stdout), 0, $e), $time ); } if ($childResult !== false) { if (!empty($childResult['output'])) { $output = $childResult['output']; } $test->setResult($childResult['testResult']); $test->addToAssertionCount($childResult['numAssertions']); $childResult = $childResult['result']; if ($result->getCollectCodeCoverageInformation()) { $result->getCodeCoverage()->merge( $childResult->getCodeCoverage() ); } $time = $childResult->time(); $notImplemented = $childResult->notImplemented(); $risky = $childResult->risky(); $skipped = $childResult->skipped(); $errors = $childResult->errors(); $failures = $childResult->failures(); if (!empty($notImplemented)) { $result->addError( $test, $this->getException($notImplemented[0]), $time ); } elseif (!empty($risky)) { $result->addError( $test, $this->getException($risky[0]), $time ); } elseif (!empty($skipped)) { $result->addError( $test, $this->getException($skipped[0]), $time ); } elseif (!empty($errors)) { $result->addError( $test, $this->getException($errors[0]), $time ); } elseif (!empty($failures)) { $result->addFailure( $test, $this->getException($failures[0]), $time ); } } } $result->endTest($test, $time); if (!empty($output)) { print $output; } } /** * Gets the thrown exception from a PHPUnit_Framework_TestFailure. * * @param PHPUnit_Framework_TestFailure $error * * @return Exception * * @since Method available since Release 3.6.0 * @see https://github.com/sebastianbergmann/phpunit/issues/74 */ private function getException(PHPUnit_Framework_TestFailure $error) { $exception = $error->thrownException(); if ($exception instanceof __PHP_Incomplete_Class) { $exceptionArray = array(); foreach ((array) $exception as $key => $value) { $key = substr($key, strrpos($key, "\0") + 1); $exceptionArray[$key] = $value; } $exception = new PHPUnit_Framework_SyntheticError( sprintf( '%s: %s', $exceptionArray['_PHP_Incomplete_Class_Name'], $exceptionArray['message'] ), $exceptionArray['code'], $exceptionArray['file'], $exceptionArray['line'], $exceptionArray['trace'] ); } return $exception; } }
/vendor/phpunit/phpunit/src/Util/
Имя
Дата
Размер
..
2017-06-21
Log
2017-06-21
PHP
2017-06-21
TestDox
2017-06-21
Blacklist.php
2017-06-21
3 кб.
Blacklist.php~
2025-01-10
3 кб.
Configuration.php
2017-06-21
35 кб.
Configuration.php~
2025-01-10
35 кб.
ErrorHandler.php
2017-06-21
3 кб.
ErrorHandler.php~
2025-01-10
3 кб.
Fileloader.php
2017-06-21
2 кб.
Fileloader.php~
2025-01-10
2 кб.
Filesystem.php
2017-06-21
918 байт
Filesystem.php~
2025-01-10
918 байт
Filter.php
2017-06-21
3 кб.
Filter.php~
2025-01-10
3 кб.
Getopt.php
2017-06-21
5 кб.
Getopt.php~
2025-01-10
5 кб.
GlobalState.php
2017-06-21
5 кб.
GlobalState.php~
2025-01-10
5 кб.
InvalidArgumentHelper.php
2017-06-21
1 кб.
InvalidArgumentHelper.php~
2025-01-10
1 кб.
PHP.php
2017-06-21
7 кб.
PHP.php~
2025-01-10
7 кб.
Printer.php
2017-06-21
4 кб.
Printer.php~
2025-01-10
4 кб.
Regex.php
2017-06-21
741 байт
Regex.php~
2025-01-10
741 байт
String.php
2017-06-21
2 кб.
String.php~
2025-01-10
2 кб.
Test.php
2017-06-21
34 кб.
Test.php~
2025-01-10
34 кб.
TestSuiteIterator.php
2017-06-21
2 кб.
TestSuiteIterator.php~
2025-01-10
2 кб.
Type.php
2017-06-21
776 байт
Type.php~
2025-01-10
776 байт
XML.php
2017-06-21
30 кб.
XML.php~
2025-01-10
30 кб.
/vendor/phpunit/phpunit/src/Util
Загрузить файлы
Файл 1
Файл 2
Файл 3