Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F97997037
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
Wed, Jan 8, 10:36
Size
640 B
Mime Type
text/x-php
Expires
Fri, Jan 10, 10:36 (2 d)
Engine
blob
Format
Raw Data
Handle
23475832
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