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); }
/** * @return TwitterEventSerializer */ public static function build() { return new self(TwitterUserSerializer::build(), TwitterEventTargetSerializer::build()); }
/** * @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()); }
/** * @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); }
private function itWillUnserializeTarget() { $this->userSerializer->shouldReceive('unserialize')->with($this->serializedTarget)->andReturn($this->target); }