Page MenuHomePhorge

EntitlementTest.php
No OneTemporary

Authored By
Unknown
Size
614 B
Referenced Files
None
Subscribers
None

EntitlementTest.php

<?php
namespace Tests\Unit;
use App\Entitlement;
use Tests\TestCase;
class EntitlementTest extends TestCase
{
/**
* Test basic cost mutator
*/
public function testSetCostAttribute(): void
{
$ent = new Entitlement();
// We probably don't have to test this, as phpstan warns us anyway
$ent->cost = 1.1; // @phpstan-ignore-line
$this->assertSame(1, $ent->cost);
$ent->cost = 1.5; // @phpstan-ignore-line
$this->assertSame(2, $ent->cost);
$ent->cost = '10'; // @phpstan-ignore-line
$this->assertSame(10, $ent->cost);
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, Apr 6, 2:48 AM (2 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
21/a8/c333adf1fc4cf3f9c83689a01170
Default Alt Text
EntitlementTest.php (614 B)

Event Timeline