Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78770070
PhutilPhobjectTestCase.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Aug 22, 21:40
Size
640 B
Mime Type
text/x-php
Expires
Sat, Aug 24, 21:40 (2 d)
Engine
blob
Format
Raw Data
Handle
20099115
Attached To
rPHU libphutil
PhutilPhobjectTestCase.php
View Options
<?php
final
class
PhutilPhobjectTestCase
extends
PhutilTestCase
{
public
function
testThrowOnUndeclaredProperty
()
{
$object
=
new
PhutilTestPhobject
();
$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
);
}
}
Event Timeline
Log In to Comment