Page MenuHomePhorge

EntitlementTest.php
No OneTemporary

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
Fri, Nov 21, 1:07 AM (20 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
387355
Default Alt Text
EntitlementTest.php (614 B)

Event Timeline