Ejemplo n.º 1
0
 private function givenNoSubSerializerCanUnserializeObject()
 {
     $this->eventTargetSerializer->shouldReceive('canUnserialize')->andReturn(false);
     $this->directMessageSerializer->shouldReceive('canUnserialize')->andReturn(false);
     $this->eventSerializer->shouldReceive('canUnserialize')->andReturn(false);
     $this->friendsSerializer->shouldReceive('canUnserialize')->andReturn(false);
     $this->disconnectSerializer->shouldReceive('canUnserialize')->andReturn(false);
     $this->deleteSerializer->shouldReceive('canUnserialize')->andReturn(false);
     $this->userSerializer->shouldReceive('canUnserialize')->andReturn(false);
 }
Ejemplo n.º 2
0
 /**
  * @return TwitterEventSerializer
  */
 public static function build()
 {
     return new self(TwitterUserSerializer::build(), TwitterEventTargetSerializer::build());
 }
Ejemplo n.º 3
0
 /**
  * @return TwitterJsonSerializer
  */
 public static function build()
 {
     return new self(TwitterEventTargetSerializer::build(), TwitterDirectMessageSerializer::build(), TwitterEventSerializer::build(), TwitterFriendsSerializer::build(), TwitterDisconnectSerializer::build(), TwitterDeleteSerializer::build(), TwitterUserSerializer::build());
 }
 /**
  * @return TwitterDirectMessageSerializer
  */
 public static function build()
 {
     return new self(TwitterUserSerializer::build(), TwitterEntitiesSerializer::build());
 }
Ejemplo n.º 5
0
 /**
  * @test
  */
 public function itShouldBuildUsingStaticBuilder()
 {
     $serializer = TwitterUserSerializer::build();
     $this->assertInstanceOf(TwitterUserSerializer::class, $serializer);
 }
 private function itWillUnserializeRecipient()
 {
     $this->userSerializer->shouldReceive('unserialize')->with($this->serializedRecipient)->andReturn($this->recipient);
 }
Ejemplo n.º 7
0
 private function itWillUnserializeTarget()
 {
     $this->userSerializer->shouldReceive('unserialize')->with($this->serializedTarget)->andReturn($this->target);
 }