File tree Expand file tree Collapse file tree 5 files changed +69
-1
lines changed
Expand file tree Collapse file tree 5 files changed +69
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+ /**
3+ * XArray
4+ *
5+ * Licensed under the Apache License, Version 2.0 (the "License");
6+ * you may not use this file except in compliance with the License.
7+ * You may obtain a copy of the License at
8+ *
9+ * http://www.apache.org/licenses/LICENSE-2.0
10+ *
11+ * Unless required by applicable law or agreed to in writing, software
12+ * distributed under the License is distributed on an "AS IS" BASIS,
13+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ * See the License for the specific language governing permissions and
15+ * limitations under the License.
16+ */
17+ namespace MindTouch \XArray ;
18+
19+ class MutableXArray extends \modethirteen \XArray \MutableXArray {
20+ }
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types=1 );
2+ /**
3+ * XArray
4+ *
5+ * Licensed under the Apache License, Version 2.0 (the "License");
6+ * you may not use this file except in compliance with the License.
7+ * You may obtain a copy of the License at
8+ *
9+ * http://www.apache.org/licenses/LICENSE-2.0
10+ *
11+ * Unless required by applicable law or agreed to in writing, software
12+ * distributed under the License is distributed on an "AS IS" BASIS,
13+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ * See the License for the specific language governing permissions and
15+ * limitations under the License.
16+ */
17+ namespace MindTouch \XArray ;
18+
19+ class XArray extends \modethirteen \XArray \XArray {
20+ }
Original file line number Diff line number Diff line change 2323 },
2424 "autoload" : {
2525 "psr-4" : {
26- "modethirteen\\ XArray\\ " : [" src/" ]
26+ "modethirteen\\ XArray\\ " : [" src/" ],
27+ "MindTouch\\ XArray\\ " : [" compatibility/" ]
2728 }
2829 },
2930 "autoload-dev" : {
Original file line number Diff line number Diff line change @@ -36,4 +36,19 @@ public function Constructor_holds_reference_to_source_array() {
3636 // assert
3737 $ this ->assertSame ($ source , $ x ->toArray ());
3838 }
39+
40+ /**
41+ * @test
42+ */
43+ public function Can_construct_compatibility_class () {
44+
45+ // arrange
46+ $ source = ['foo ' => 'bar ' ];
47+
48+ // act
49+ $ x = new \MindTouch \XArray \MutableXArray ($ source );
50+
51+ // assert
52+ $ this ->assertTrue (is_subclass_of ($ x , MutableXArray::class));
53+ }
3954}
Original file line number Diff line number Diff line change @@ -36,4 +36,16 @@ public function Constructor_does_not_hold_reference_to_source_array() {
3636 // assert
3737 $ this ->assertNotSame ($ source , $ x ->toArray ());
3838 }
39+
40+ /**
41+ * @test
42+ */
43+ public function Can_construct_compatibility_class () {
44+
45+ // act
46+ $ x = new \MindTouch \XArray \XArray ();
47+
48+ // assert
49+ $ this ->assertTrue (is_subclass_of ($ x , XArray::class));
50+ }
3951}
You can’t perform that action at this time.
0 commit comments