1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
<?php
declare(strict_types=1);
namespace Brick\Math\Tests;
use Brick\Math\Internal\Calculator;
use PHPUnit\Framework\TestCase;
/**
* Tests for Calculator implementation detection.
*/
class CalculatorDetectTest extends TestCase
{
public function testGetWithNoCalculatorSetDetectsCalculator() : void
{
$currentCalculator = Calculator::get();
Calculator::set(null);
self::assertInstanceOf(Calculator::class, Calculator::get());
Calculator::set($currentCalculator);
}
}
|