REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 5.33 KB
Close
//proc/thread-self/root/home/getspomw/royalsquad.us/vendor/hamcrest/hamcrest-php/tests/Hamcrest/StringDescriptionTest.php
Text
Base64
<?php namespace Hamcrest; use PHPUnit\Framework\TestCase; class SampleSelfDescriber implements \Hamcrest\SelfDescribing { private $_text; public function __construct($text) { $this->_text = $text; } public function describeTo(\Hamcrest\Description $description) { $description->appendText($this->_text); } } class StringDescriptionTest extends TestCase { private $_description; protected function setUp() { $this->_description = new \Hamcrest\StringDescription(); } public function testAppendTextAppendsTextInformation() { $this->_description->appendText('foo')->appendText('bar'); $this->assertEquals('foobar', (string) $this->_description); } public function testAppendValueCanAppendTextTypes() { $this->_description->appendValue('foo'); $this->assertEquals('"foo"', (string) $this->_description); } public function testSpecialCharactersAreEscapedForStringTypes() { $this->_description->appendValue("foo\\bar\"zip\r\n"); $this->assertEquals('"foo\\bar\\"zip\r\n"', (string) $this->_description); } public function testIntegerValuesCanBeAppended() { $this->_description->appendValue(42); $this->assertEquals('<42>', (string) $this->_description); } public function testFloatValuesCanBeAppended() { $this->_description->appendValue(42.78); $this->assertEquals('<42.78F>', (string) $this->_description); } public function testNullValuesCanBeAppended() { $this->_description->appendValue(null); $this->assertEquals('null', (string) $this->_description); } public function testArraysCanBeAppended() { $this->_description->appendValue(array('foo', 42.78)); $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); } public function testObjectsCanBeAppended() { $this->_description->appendValue(new \stdClass()); $this->assertEquals('<stdClass>', (string) $this->_description); } public function testBooleanValuesCanBeAppended() { $this->_description->appendValue(false); $this->assertEquals('<false>', (string) $this->_description); } public function testListsOfvaluesCanBeAppended() { $this->_description->appendValue(array('foo', 42.78)); $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); } public function testIterableOfvaluesCanBeAppended() { $items = new \ArrayObject(array('foo', 42.78)); $this->_description->appendValue($items); $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); } public function testIteratorOfvaluesCanBeAppended() { $items = new \ArrayObject(array('foo', 42.78)); $this->_description->appendValue($items->getIterator()); $this->assertEquals('["foo", <42.78F>]', (string) $this->_description); } public function testListsOfvaluesCanBeAppendedManually() { $this->_description->appendValueList('@start@', '@sep@ ', '@end@', array('foo', 42.78)); $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description); } public function testIterableOfvaluesCanBeAppendedManually() { $items = new \ArrayObject(array('foo', 42.78)); $this->_description->appendValueList('@start@', '@sep@ ', '@end@', $items); $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description); } public function testIteratorOfvaluesCanBeAppendedManually() { $items = new \ArrayObject(array('foo', 42.78)); $this->_description->appendValueList('@start@', '@sep@ ', '@end@', $items->getIterator()); $this->assertEquals('@start@"foo"@sep@ <42.78F>@end@', (string) $this->_description); } public function testSelfDescribingObjectsCanBeAppended() { $this->_description ->appendDescriptionOf(new \Hamcrest\SampleSelfDescriber('foo')) ->appendDescriptionOf(new \Hamcrest\SampleSelfDescriber('bar')) ; $this->assertEquals('foobar', (string) $this->_description); } public function testSelfDescribingObjectsCanBeAppendedAsLists() { $this->_description->appendList('@start@', '@sep@ ', '@end@', array( new \Hamcrest\SampleSelfDescriber('foo'), new \Hamcrest\SampleSelfDescriber('bar') )); $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description); } public function testSelfDescribingObjectsCanBeAppendedAsIteratedLists() { $items = new \ArrayObject(array( new \Hamcrest\SampleSelfDescriber('foo'), new \Hamcrest\SampleSelfDescriber('bar') )); $this->_description->appendList('@start@', '@sep@ ', '@end@', $items); $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description); } public function testSelfDescribingObjectsCanBeAppendedAsIterators() { $items = new \ArrayObject(array( new \Hamcrest\SampleSelfDescriber('foo'), new \Hamcrest\SampleSelfDescriber('bar') )); $this->_description->appendList('@start@', '@sep@ ', '@end@', $items->getIterator()); $this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 7 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Array
DIR
-
drwxrwxrwx
2025-09-17 06:53:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Collection
DIR
-
drwxrwxrwx
2025-09-17 06:53:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Core
DIR
-
drwxrwxrwx
2025-09-17 06:53:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Number
DIR
-
drwxrwxrwx
2025-09-17 06:53:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Text
DIR
-
drwxrwxrwx
2025-09-17 06:53:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Type
DIR
-
drwxrwxrwx
2025-09-17 06:53:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Xml
DIR
-
drwxrwxrwx
2025-09-17 06:53:36
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AbstractMatcherTest.php
1.87 KB
lrw-rw-rw-
2025-09-17 06:53:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
BaseMatcherTest.php
535 B
lrw-rw-rw-
2025-09-17 06:53:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
error_log
9.41 KB
lrw-r--r--
2026-04-26 10:07:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
FeatureMatcherTest.php
1.62 KB
lrw-rw-rw-
2025-09-17 06:53:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
InvokedMatcherTest.php
611 B
lrw-rw-rw-
2025-09-17 06:53:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
MatcherAssertTest.php
7.18 KB
lrw-rw-rw-
2025-09-17 06:53:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
StringDescriptionTest.php
5.33 KB
lrw-rw-rw-
2025-09-17 06:53:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
UtilTest.php
2.57 KB
lrw-rw-rw-
2025-09-17 06:53:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).