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 : 3.140.201.179
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp /
vendor /
theseer /
tokenizer /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
_files
[ DIR ]
drwxr-xr-x
2017-04-07 09:00
NamespaceUriTest.php
728
B
-rw-r--r--
2017-04-07 09:00
TokenCollectionTest.php
2.18
KB
-rw-r--r--
2017-04-07 09:00
TokenTest.php
758
B
-rw-r--r--
2017-04-07 09:00
TokenizerTest.php
565
B
-rw-r--r--
2017-04-07 09:00
XMLSerializerTest.php
1.27
KB
-rw-r--r--
2017-04-07 09:00
Save
Rename
<?php declare(strict_types = 1); namespace TheSeer\Tokenizer; use PHPUnit\Framework\TestCase; /** * @covers \TheSeer\Tokenizer\TokenCollection */ class TokenCollectionTest extends TestCase { /** @var TokenCollection */ private $collection; protected function setUp() { $this->collection = new TokenCollection(); } public function testCollectionIsInitiallyEmpty() { $this->assertCount(0, $this->collection); } public function testTokenCanBeAddedToCollection() { $token = $this->createMock(Token::class); $this->collection->addToken($token); $this->assertCount(1, $this->collection); $this->assertSame($token, $this->collection[0]); } public function testCanIterateOverTokens() { $token = $this->createMock(Token::class); $this->collection->addToken($token); $this->collection->addToken($token); foreach($this->collection as $position => $current) { $this->assertInternalType('integer', $position); $this->assertSame($token, $current); } } public function testOffsetCanBeUnset() { $token = $this->createMock(Token::class); $this->collection->addToken($token); $this->assertCount(1, $this->collection); unset($this->collection[0]); $this->assertCount(0, $this->collection); } public function testTokenCanBeSetViaOffsetPosition() { $token = $this->createMock(Token::class); $this->collection[0] = $token; $this->assertCount(1, $this->collection); $this->assertSame($token, $this->collection[0]); } public function testTryingToUseNonIntegerOffsetThrowsException() { $this->expectException(TokenCollectionException::class); $this->collection['foo'] = $this->createMock(Token::class); } public function testTryingToSetNonTokenAtOffsetThrowsException() { $this->expectException(TokenCollectionException::class); $this->collection[0] = 'abc'; } public function testTryingToGetTokenAtNonExistingOffsetThrowsException() { $this->expectException(TokenCollectionException::class); $x = $this->collection[3]; } }