Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 216.73.216.44
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
hamcrest /
hamcrest-php /
tests /
Hamcrest /
Delete
Unzip
Name
Size
Permission
Date
Action
Array
[ DIR ]
drwxr-xr-x
2016-01-20 09:00
Collection
[ DIR ]
drwxr-xr-x
2016-01-20 09:00
Core
[ DIR ]
drwxr-xr-x
2016-01-20 09:00
Number
[ DIR ]
drwxr-xr-x
2016-01-20 09:00
Text
[ DIR ]
drwxr-xr-x
2016-01-20 09:00
Type
[ DIR ]
drwxr-xr-x
2016-01-20 09:00
Xml
[ DIR ]
drwxr-xr-x
2016-01-20 09:00
AbstractMatcherTest.php
1.86
KB
-rw-r--r--
2016-01-20 09:00
BaseMatcherTest.php
535
B
-rw-r--r--
2016-01-20 09:00
FeatureMatcherTest.php
1.62
KB
-rw-r--r--
2016-01-20 09:00
MatcherAssertTest.php
7.17
KB
-rw-r--r--
2016-01-20 09:00
StringDescriptionTest.php
5.32
KB
-rw-r--r--
2016-01-20 09:00
UtilTest.php
2.55
KB
-rw-r--r--
2016-01-20 09:00
Save
Rename
<?php namespace Hamcrest; class UtilTest extends \PhpUnit_Framework_TestCase { public function testWrapValueWithIsEqualLeavesMatchersUntouched() { $matcher = new \Hamcrest\Text\MatchesPattern('/fo+/'); $newMatcher = \Hamcrest\Util::wrapValueWithIsEqual($matcher); $this->assertSame($matcher, $newMatcher); } public function testWrapValueWithIsEqualWrapsPrimitive() { $matcher = \Hamcrest\Util::wrapValueWithIsEqual('foo'); $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matcher); $this->assertTrue($matcher->matches('foo')); } public function testCheckAllAreMatchersAcceptsMatchers() { \Hamcrest\Util::checkAllAreMatchers(array( new \Hamcrest\Text\MatchesPattern('/fo+/'), new \Hamcrest\Core\IsEqual('foo'), )); } /** * @expectedException InvalidArgumentException */ public function testCheckAllAreMatchersFailsForPrimitive() { \Hamcrest\Util::checkAllAreMatchers(array( new \Hamcrest\Text\MatchesPattern('/fo+/'), 'foo', )); } private function callAndAssertCreateMatcherArray($items) { $matchers = \Hamcrest\Util::createMatcherArray($items); $this->assertInternalType('array', $matchers); $this->assertSameSize($items, $matchers); foreach ($matchers as $matcher) { $this->assertInstanceOf('\Hamcrest\Matcher', $matcher); } return $matchers; } public function testCreateMatcherArrayLeavesMatchersUntouched() { $matcher = new \Hamcrest\Text\MatchesPattern('/fo+/'); $items = array($matcher); $matchers = $this->callAndAssertCreateMatcherArray($items); $this->assertSame($matcher, $matchers[0]); } public function testCreateMatcherArrayWrapsPrimitiveWithIsEqualMatcher() { $matchers = $this->callAndAssertCreateMatcherArray(array('foo')); $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matchers[0]); $this->assertTrue($matchers[0]->matches('foo')); } public function testCreateMatcherArrayDoesntModifyOriginalArray() { $items = array('foo'); $this->callAndAssertCreateMatcherArray($items); $this->assertSame('foo', $items[0]); } public function testCreateMatcherArrayUnwrapsSingleArrayElement() { $matchers = $this->callAndAssertCreateMatcherArray(array(array('foo'))); $this->assertInstanceOf('Hamcrest\Core\IsEqual', $matchers[0]); $this->assertTrue($matchers[0]->matches('foo')); } }