����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 216.73.216.178 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/www/vendor/laravel/framework/src/Illuminate/Testing/Constraints/ |
Upload File : |
<?php namespace Illuminate\Testing\Constraints; use PHPUnit\Framework\Constraint\Constraint; use ReflectionClass; class SeeInOrder extends Constraint { /** * The string under validation. * * @var string */ protected $content; /** * The last value that failed to pass validation. * * @var string */ protected $failedValue; /** * Create a new constraint instance. * * @param string $content * @return void */ public function __construct($content) { $this->content = $content; } /** * Determine if the rule passes validation. * * @param array $values * @return bool */ public function matches($values): bool { $position = 0; foreach ($values as $value) { if (empty($value)) { continue; } $valuePosition = mb_strpos($this->content, $value, $position); if ($valuePosition === false || $valuePosition < $position) { $this->failedValue = $value; return false; } $position = $valuePosition + mb_strlen($value); } return true; } /** * Get the description of the failure. * * @param array $values * @return string */ public function failureDescription($values): string { return sprintf( 'Failed asserting that \'%s\' contains "%s" in specified order.', $this->content, $this->failedValue ); } /** * Get a string representation of the object. * * @return string */ public function toString(): string { return (new ReflectionClass($this))->name; } }