phpOMS/tests/Math/Matrix/IdentityMatrixTest.php
2018-01-15 17:20:46 +01:00

38 lines
807 B
PHP

<?php
/**
* Orange Management
*
* PHP Version 7.1
*
* @package TBD
* @author OMS Development Team <dev@oms.com>
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
namespace Tests\PHPUnit\phpOMS\Math\Matrix;
require_once __DIR__ . '/../../Autoloader.php';
use phpOMS\Math\Matrix\IdentityMatrix;
class IdentityMatrixTest extends \PHPUnit\Framework\TestCase
{
public function testIdentity()
{
$id = new IdentityMatrix(5);
self::assertEquals(
[
[1, 0, 0, 0, 0],
[0, 1, 0, 0, 0],
[0, 0, 1, 0, 0],
[0, 0, 0, 1, 0],
[0, 0, 0, 0, 1],
],
$id->toArray()
);
}
}