Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2485134
EntitlementTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
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
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)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment