Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117887042
EntitlementTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
614 B
Referenced Files
None
Subscribers
None
EntitlementTest.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline