Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3282175
PhobjectTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
801 B
Referenced Files
None
Subscribers
None
PhobjectTestCase.php
View Options
<?php
final
class
PhobjectTestCase
extends
PhutilTestCase
{
public
function
testThrowOnUndeclaredProperty
(
)
{
$object
=
new
PhutilTestPhobject
(
)
;
$caught
=
null
;
try
{
$object
->
duck
;
}
catch
(
Exception
$ex
)
{
$caught
=
$ex
;
}
$this
->
assertTrue
(
$caught
instanceof
DomainException
)
;
$caught
=
null
;
try
{
$object
->
duck
=
'quack'
;
}
catch
(
Exception
$ex
)
{
$caught
=
$ex
;
}
$this
->
assertTrue
(
$caught
instanceof
DomainException
)
;
}
public
function
testThrowOnIteration
(
)
{
$object
=
new
PhutilTestPhobject
(
)
;
$caught
=
null
;
try
{
foreach
(
$object
as
$item
)
{
// ...
}
}
catch
(
Exception
$ex
)
{
$caught
=
$ex
;
}
$this
->
assertTrue
(
$caught
instanceof
DomainException
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Mar 24, 05:46 (4 d, 13 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1117725
Default Alt Text
PhobjectTestCase.php (801 B)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment