File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,27 +109,6 @@ private static function extractSerializationParts( $serialization ) {
109109 ];
110110 }
111111
112- /**
113- * Builds an ID serialization from the parts returned by SerializableEntityId::splitSerialization.
114- *
115- * @param string[] $parts
116- *
117- * @throws InvalidArgumentException
118- * @return string
119- */
120- public static function joinSerialization ( array $ parts ) {
121- if ( end ( $ parts ) === '' ) {
122- throw new InvalidArgumentException ( 'The last element of $parts must not be empty. ' );
123- }
124-
125- return implode (
126- ': ' ,
127- array_filter ( $ parts , function ( $ part ) {
128- return $ part !== '' ;
129- } )
130- );
131- }
132-
133112 /**
134113 * Returns '' for local IDs and the foreign repository name for foreign IDs. For chained IDs (e.g. foo:bar:Q42) it
135114 * will return only the first part.
Original file line number Diff line number Diff line change @@ -129,29 +129,6 @@ public function testSplitSerializationFails_GivenInvalidSerialization( $serializ
129129 SerializableEntityId::splitSerialization ( $ serialization );
130130 }
131131
132- /**
133- * @dataProvider serializationSplitProvider
134- */
135- public function testJoinSerialization ( $ serialization , $ split ) {
136- $ this ->assertSame ( $ serialization , SerializableEntityId::joinSerialization ( $ split ) );
137- }
138-
139- /**
140- * @dataProvider invalidJoinSerializationDataProvider
141- */
142- public function testJoinSerializationFails_GivenEmptyId ( $ parts ) {
143- $ this ->expectException ( InvalidArgumentException::class );
144- SerializableEntityId::joinSerialization ( $ parts );
145- }
146-
147- public static function invalidJoinSerializationDataProvider () {
148- return [
149- [ [ 'Q42 ' , '' , '' ] ],
150- [ [ '' , 'Q42 ' , '' ] ],
151- [ [ 'foo ' , 'Q42 ' , '' ] ],
152- ];
153- }
154-
155132 public function testGetLocalPart () {
156133 $ id = new ItemId ( 'Q42 ' );
157134 $ this ->assertSame ( 'Q42 ' , $ id ->getLocalPart () );
You can’t perform that action at this time.
0 commit comments