Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F629923
runtimeexception-haserrorlabel-001.phpt
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
512 B
Referenced Files
None
Subscribers
None
runtimeexception-haserrorlabel-001.phpt
View Options
--TEST--
MongoDB\Driver\Exception\RuntimeException::hasErrorLabel()
--FILE--
<?php
$exception = new MongoDB\Driver\Exception\RuntimeException();
$labels = ['test', 'foo'];
$reflection = new ReflectionClass($exception);
$resultDocumentProperty = $reflection->getProperty('errorLabels');
$resultDocumentProperty->setValue($exception, $labels);
var_dump($exception->hasErrorLabel('foo'));
var_dump($exception->hasErrorLabel('bar'));
?>
===DONE===
<?php exit(0); ?>
--EXPECT--
bool(true)
bool(false)
===DONE===
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 8:10 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
143877
Default Alt Text
runtimeexception-haserrorlabel-001.phpt (512 B)
Attached To
Mode
R114 php-mongodb
Attached
Detach File
Event Timeline