1
0
mirror of https://github.com/danog/math.git synced 2024-11-27 04:14:40 +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
}
}