2016-05-24 13:59:35 +02:00
|
|
|
<?php namespace Moserware\Skills\Tests\Numerics;
|
2010-08-28 22:05:41 -04:00
|
|
|
|
2016-05-24 15:12:29 +02:00
|
|
|
use Moserware\Skills\Numerics\BasicMath;
|
2016-05-24 14:06:43 +02:00
|
|
|
use Moserware\Skills\Tests\TestCase;
|
|
|
|
|
|
|
|
class BasicMathTest extends TestCase
|
2016-05-24 13:59:35 +02:00
|
|
|
{
|
2010-08-28 22:05:41 -04:00
|
|
|
public function testSquare()
|
2016-05-24 13:59:35 +02:00
|
|
|
{
|
2016-05-24 15:12:29 +02:00
|
|
|
$this->assertEquals(1, BasicMath::square(1));
|
|
|
|
$this->assertEquals(1.44, BasicMath::square(1.2));
|
|
|
|
$this->assertEquals(4, BasicMath::square(2));
|
2010-08-28 22:05:41 -04:00
|
|
|
}
|
2016-05-24 13:59:35 +02:00
|
|
|
}
|