Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F71716058
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
Fri, Jul 12, 18:29
Size
640 B
Mime Type
text/x-php
Expires
Sun, Jul 14, 18:29 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18976833
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