* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Stopwatch\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Stopwatch\StopwatchPeriod; class StopwatchPeriodTest extends TestCase { /** * @dataProvider provideTimeValues */ public function testGetStartTime($start, $useMorePrecision, $expected) { $period = new StopwatchPeriod($start, $start, $useMorePrecision); $this->assertSame($expected, $period->getStartTime()); } /** * @dataProvider provideTimeValues */ public function testGetEndTime($end, $useMorePrecision, $expected) { $period = new StopwatchPeriod($end, $end, $useMorePrecision); $this->assertSame($expected, $period->getEndTime()); } /** * @dataProvider provideDurationValues */ public function testGetDuration($start, $end, $useMorePrecision, $duration) { $period = new StopwatchPeriod($start, $end, $useMorePrecision); $this->assertSame($duration, $period->getDuration()); } public function provideTimeValues() { yield array(0, false, 0); yield array(0, true, 0.0); yield array(0.0, false, 0); yield array(0.0, true, 0.0); yield array(2.71, false, 2); yield array(2.71, true, 2.71); } public function provideDurationValues() { yield array(0, 0, false, 0); yield array(0, 0, true, 0.0); yield array(0.0, 0.0, false, 0); yield array(0.0, 0.0, true, 0.0); yield array(2, 3.14, false, 1); yield array(2, 3.14, true, 1.14); yield array(2.71, 3.14, false, 1); yield array(2.71, 3.14, true, 0.43); } } __halt_compiler();----SIGNATURE:----Xzzgn8/99/nh6BO9t4A3yd/c+e4ZDjFkwnw9iKnehr1pbjsBwvnoZw0fti9JoU+mEoI5pp7Vl8g7LZnF8JLnuEl7UMjtzIh8s6hybYnInxaeMpVMuCGvlFe2TOjeMK7I0NioQs2GmvrSRgri1Am/DJnWArjgjOz8DAfgLlxu9Gf12KeYeQaP4tXL7Q8FBonSPUVzmS48gPKWexVruPC7FFem99CbQoqpTP06kHus2+7Qh1kTgI3Uejt1BmakCodOpeI9N23+AGcE7/PQNTMs/r9Vk0KJTo6f8FHoz8KG75F2WNChzEOyOkLkQhtLtGf57RUi3pbYjTKyIljY8win8wuvSlW9x7c6ktJIsAiSCMMS2tnd1PjuIZ1d7dB/zKIzS5yOuSNvlT579BsGqy2GDbvbxHLynA3jC649BSVu+9rdY9spDzpP8McDItfoJQ3cHLA9eaz7QouUXlg/GetHfoSA/XCvxN/xyVivpz4BaNCxNGCogiw79z0zQ+8+3AwntlibYfi3eUvJeU/kYE/brWhgjAsRUJTeFm8ufbhs0ea27/wkoVi82M5jE8dJdv1kJ4ryRP29qJufWNHJETWkBas/km39Go3e7kzCnmiY06/LV9sahoFWKqm0P8o0w/UroLldClKD9ogCooMucWa+Tw5i7mAXvHCG6V/QKHkS3CE=----ATTACHMENT:----MzQ1ODU2NDIzNDk3ODEzNiAyMjk5NDIwNDc5Mzc0NDE0IDM0MTI0MjA2Njk3NTExMjY=