Орла
Области
Компаний
Пользователи
Галерея
Фиксированные новости
Орла
Отзывы о фирмах
Тарифы
Пользователи
Области
Банкоматы
Торговые точки
Доска объявлений
Курсы валют
Скидки
организации Орла
организации области
товары
сайты
сайты Орел
Данные
Разделы
Поиск
Поиск запросы
Статистика
Показы каталога организаций
Статистика клиенты
Пользователи
Сайты
Управление сайтом
Анкета
Аптеки
Афиша
Афиша новая
Баннеры
Бизнес >
Викторина
Голосование
Гость на сайте
Истории
Календарь событий
Каталоги >
Конкурс красоты
Конкурс аудио
Консультации
Меню
Новое на сайте
Новости >
Организации >
Программа ТВ
Публикации
Разделы сайта
Рассылка
Рестораны
Секрет фирмы >
Сервисы >
Ссылки
Тесты
Файловый менеджер
Форум
Фотогалерея
Обратная связь
Недвижимость
Новый год
Тексты
Пользователи
Юридический рейтинг
Отзывы на товары
Бан пользователей
Жалобы
Новые тесты
Коронавирус
Файловый менеджер
Имя файла
IsIdentical.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. */ /** * Constraint that asserts that one value is identical to another. * * Identical check is performed with PHP's === operator, the operator is * explained in detail at * {@url http://www.php.net/manual/en/types.comparisons.php}. * Two values are identical if they have the same value and are of the same * type. * * The expected value is passed in the constructor. * * @since Class available since Release 3.0.0 */ class PHPUnit_Framework_Constraint_IsIdentical extends PHPUnit_Framework_Constraint { /** * @var float */ const EPSILON = 0.0000000001; /** * @var mixed */ protected $value; /** * @param mixed $value */ public function __construct($value) { parent::__construct(); $this->value = $value; } /** * Evaluates the constraint for parameter $other * * If $returnResult is set to false (the default), an exception is thrown * in case of a failure. null is returned otherwise. * * If $returnResult is true, the result of the evaluation is returned as * a boolean value instead: true in case of success, false in case of a * failure. * * @param mixed $other Value or object to evaluate. * @param string $description Additional information about the test * @param bool $returnResult Whether to return a result or throw an exception * * @return mixed * * @throws PHPUnit_Framework_ExpectationFailedException */ public function evaluate($other, $description = '', $returnResult = false) { if (is_double($this->value) && is_double($other) && !is_infinite($this->value) && !is_infinite($other) && !is_nan($this->value) && !is_nan($other)) { $success = abs($this->value - $other) < self::EPSILON; } else { $success = $this->value === $other; } if ($returnResult) { return $success; } if (!$success) { $f = null; // if both values are strings, make sure a diff is generated if (is_string($this->value) && is_string($other)) { $f = new SebastianBergmann\Comparator\ComparisonFailure( $this->value, $other, $this->value, $other ); } $this->fail($other, $description, $f); } } /** * Returns the description of the failure * * The beginning of failure messages is "Failed asserting that" in most * cases. This method should return the second part of that sentence. * * @param mixed $other Evaluated value or object. * * @return string */ protected function failureDescription($other) { if (is_object($this->value) && is_object($other)) { return 'two variables reference the same object'; } if (is_string($this->value) && is_string($other)) { return 'two strings are identical'; } return parent::failureDescription($other); } /** * Returns a string representation of the constraint. * * @return string */ public function toString() { if (is_object($this->value)) { return 'is identical to an object of class "' . get_class($this->value) . '"'; } else { return 'is identical to ' . $this->exporter->export($this->value); } } }
/vendor/phpunit/phpunit/src/Framework/Constraint/
Имя
Дата
Размер
..
2017-06-21
JsonMatches
2017-06-21
And.php
2017-06-21
3 кб.
And.php~
2025-01-10
3 кб.
ArrayHasKey.php
2017-06-21
2 кб.
ArrayHasKey.php~
2025-01-10
2 кб.
ArraySubset.php
2017-06-21
2 кб.
ArraySubset.php~
2025-01-10
2 кб.
Attribute.php
2017-06-21
2 кб.
Attribute.php~
2025-01-10
2 кб.
Callback.php
2017-06-21
1 кб.
Callback.php~
2025-01-10
1 кб.
ClassHasAttribute.php
2017-06-21
2 кб.
ClassHasAttribute.php~
2025-01-10
2 кб.
ClassHasStaticAttribute.php
2017-06-21
1 кб.
ClassHasStaticAttribute.php~
2025-01-10
1 кб.
Composite.php
2017-06-21
2 кб.
Composite.php~
2025-01-10
2 кб.
Count.php
2017-06-21
2 кб.
Count.php~
2025-01-10
2 кб.
Exception.php
2017-06-21
2 кб.
Exception.php~
2025-01-10
2 кб.
ExceptionCode.php
2017-06-21
2 кб.
ExceptionCode.php~
2025-01-10
2 кб.
ExceptionMessage.php
2017-06-21
2 кб.
ExceptionMessage.php~
2025-01-10
2 кб.
ExceptionMessageRegExp.php
2017-06-21
2 кб.
ExceptionMessageRegExp.php~
2025-01-10
2 кб.
FileExists.php
2017-06-21
1 кб.
FileExists.php~
2025-01-10
1 кб.
GreaterThan.php
2017-06-21
1 кб.
GreaterThan.php~
2025-01-10
1 кб.
IsAnything.php
2017-06-21
2 кб.
IsAnything.php~
2025-01-10
2 кб.
IsEmpty.php
2017-06-21
2 кб.
IsEmpty.php~
2025-01-10
2 кб.
IsEqual.php
2017-06-21
5 кб.
IsEqual.php~
2025-01-10
5 кб.
IsFalse.php
2017-06-21
885 байт
IsFalse.php~
2025-01-10
885 байт
IsIdentical.php
2017-06-21
4 кб.
IsIdentical.php~
2025-01-10
4 кб.
IsInstanceOf.php
2017-06-21
2 кб.
IsInstanceOf.php~
2025-01-10
2 кб.
IsJson.php
2017-06-21
2 кб.
IsJson.php~
2025-01-10
2 кб.
IsNull.php
2017-06-21
881 байт
IsNull.php~
2025-01-10
881 байт
IsTrue.php
2017-06-21
881 байт
IsTrue.php~
2025-01-10
881 байт
IsType.php
2017-06-21
3 кб.
IsType.php~
2025-01-10
3 кб.
JsonMatches.php
2017-06-21
2 кб.
JsonMatches.php~
2025-01-10
2 кб.
LessThan.php
2017-06-21
1 кб.
LessThan.php~
2025-01-10
1 кб.
Not.php
2017-06-21
4 кб.
Not.php~
2025-01-10
4 кб.
ObjectHasAttribute.php
2017-06-21
925 байт
ObjectHasAttribute.php~
2025-01-10
925 байт
Or.php
2017-06-21
3 кб.
Or.php~
2025-01-10
3 кб.
PCREMatch.php
2017-06-21
1 кб.
PCREMatch.php~
2025-01-10
1 кб.
SameSize.php
2017-06-21
595 байт
SameSize.php~
2025-01-10
595 байт
StringContains.php
2017-06-21
2 кб.
StringContains.php~
2025-01-10
2 кб.
StringEndsWith.php
2017-06-21
1 кб.
StringEndsWith.php~
2025-01-10
1 кб.
StringMatches.php
2017-06-21
2 кб.
StringMatches.php~
2025-01-10
2 кб.
StringStartsWith.php
2017-06-21
1 кб.
StringStartsWith.php~
2025-01-10
1 кб.
TraversableContains.php
2017-06-21
3 кб.
TraversableContains.php~
2025-01-10
3 кб.
TraversableContainsOnly.php
2017-06-21
2 кб.
TraversableContainsOnly.php~
2025-01-10
2 кб.
Xor.php
2017-06-21
3 кб.
Xor.php~
2025-01-10
3 кб.
/vendor/phpunit/phpunit/src/Framework/Constraint
Загрузить файлы
Файл 1
Файл 2
Файл 3