Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F68449531
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, Jun 27, 11:04
Size
640 B
Mime Type
text/x-php
Expires
Sat, Jun 29, 11:04 (2 d)
Engine
blob
Format
Raw Data
Handle
18584803
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