1
0
mirror of https://github.com/danog/math.git synced 2024-12-13 17:57:33 +01:00
math/tests/CalculatorDetectTest.php

22 lines
473 B
PHP
Raw Normal View History

2014-08-31 14:13:46 +02:00
<?php
namespace Brick\Math\Tests;
2014-08-31 14:13:46 +02:00
use Brick\Math\Internal\Calculator;
/**
* Tests for Calculator implementation detection.
*/
class CalculatorDetectTest extends \PHPUnit_Framework_TestCase
{
public function testGetWithNoCalculatorSetDetectsCalculator()
{
$currentCalculator = Calculator::get();
2014-08-31 14:13:46 +02:00
Calculator::set(null);
$this->assertInstanceOf(Calculator::class, Calculator::get());
Calculator::set($currentCalculator);
2014-08-31 14:13:46 +02:00
}
}