File: CalculatorDetectTest.php

package info (click to toggle)
php-brick-math 0.12.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: php: 8,290; xml: 108; makefile: 18
file content (25 lines) | stat: -rw-r--r-- 519 bytes parent folder | download | duplicates (3)
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);
    }
}