mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-12 02:08:40 +00:00
40 lines
1.1 KiB
PHP
Executable File
40 lines
1.1 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* Jingga
|
|
*
|
|
* PHP Version 8.2
|
|
*
|
|
* @package tests
|
|
* @copyright Dennis Eichhorn
|
|
* @license OMS License 2.0
|
|
* @version 1.0.0
|
|
* @link https://jingga.app
|
|
*/
|
|
declare(strict_types=1);
|
|
|
|
namespace phpOMS\tests\Math\Geometry\Shape\D3;
|
|
|
|
use phpOMS\Math\Geometry\Shape\D3\Cuboid;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
#[\PHPUnit\Framework\Attributes\CoversClass(\phpOMS\Math\Geometry\Shape\D3\Cuboid::class)]
|
|
#[\PHPUnit\Framework\Attributes\TestDox('phpOMS\tests\Math\Geometry\Shape\D3\CuboidTest: Cuboid shape')]
|
|
final class CuboidTest extends \PHPUnit\Framework\TestCase
|
|
{
|
|
#[\PHPUnit\Framework\Attributes\Group('framework')]
|
|
#[\PHPUnit\Framework\Attributes\TestDox('The volume can be calculated')]
|
|
public function testVolume() : void
|
|
{
|
|
self::assertEqualsWithDelta(200, Cuboid::getVolume(10, 5, 4), 0.001);
|
|
}
|
|
|
|
#[\PHPUnit\Framework\Attributes\Group('framework')]
|
|
#[\PHPUnit\Framework\Attributes\TestDox('The surface can be calculated')]
|
|
public function testSurface() : void
|
|
{
|
|
self::assertEqualsWithDelta(220, Cuboid::getSurface(10, 5, 4), 0.001);
|
|
}
|
|
}
|