@@ -958,7 +958,7 @@ public function dataProviderForIsNotSubset(): array
958958
959959 /**
960960 * @test
961- * @dataProvider dataProviderForIsProperSet
961+ * @dataProvider dataProviderForIsProperSubset
962962 */
963963 public function testIsProperSubset (array $ A , array $ B )
964964 {
@@ -970,21 +970,121 @@ public function testIsProperSubset(array $A, array $B)
970970 $ this ->assertTrue ($ setA ->isProperSubset ($ setB ));
971971 }
972972
973+ public function dataProviderForIsProperSubset (): array
974+ {
975+ return [
976+ [
977+ [],
978+ [1 ],
979+ ],
980+ [
981+ [1 ],
982+ [1 , 2 ],
983+ ],
984+ [
985+ [1 , 2 ],
986+ [1 , 2 , 3 ],
987+ ],
988+ [
989+ [1 , 3 , 2 ],
990+ [1 , 2 , 3 , 4 ],
991+ ],
992+ [
993+ [1 , 2 ,'a ' , 4.5 , new Set ([1 , 2 ])],
994+ [1 , 2 , 3 , 'a ' , 4.5 , new Set ([1 , 2 ])],
995+ ],
996+ [
997+ [1 , 3 , 'a ' , 4.5 , new Set ([1 , 2 ])],
998+ [1 , 2 , 3 , 'a ' , 4.5 , new Set ([1 , 2 ])],
999+ ],
1000+ [
1001+ [1 , 2 , 3 , 'a ' , 4.5 , new Set ([1 , 2 ]), -1 , -2 , 3.5 ],
1002+ [1 , 2 , 3 , 'a ' , 4.5 , new Set ([1 , 2 ]), -1 , -2 , 2.4 , 3.5 ],
1003+ ],
1004+ ];
1005+ }
1006+
1007+
1008+ /**
1009+ * @test
1010+ * @dataProvider dataProviderForIsSameSets
1011+ * @dataProvider dataProviderForIsProperSuperset
1012+ */
1013+ public function testIsNotProperSubset (array $ A , array $ B )
1014+ {
1015+ // Given
1016+ $ setA = new Set ($ A );
1017+ $ setB = new Set ($ B );
1018+
1019+ // Then
1020+ $ this ->assertFalse ($ setA ->isProperSubset ($ setB ));
1021+ }
1022+
9731023 /**
9741024 * @test
975- * @dataProvider dataProviderForIsProperSet
1025+ * @dataProvider dataProviderForIsProperSuperset
9761026 */
9771027 public function testIsProperSuperset (array $ A , array $ B )
9781028 {
9791029 // Given
980- $ setA = new Set ($ B );
981- $ setB = new Set ($ A );
1030+ $ setA = new Set ($ A );
1031+ $ setB = new Set ($ B );
1032+
1033+ // Then
1034+ $ this ->assertTrue ($ setA ->isProperSuperset ($ setB ));
1035+ }
1036+
1037+ public function dataProviderForIsProperSuperset (): array
1038+ {
1039+ return [
1040+ [
1041+ [1 ],
1042+ [],
1043+ ],
1044+ [
1045+ [1 , 2 ],
1046+ [1 ],
1047+ ],
1048+ [
1049+ [1 , 2 , 3 ],
1050+ [1 , 2 ],
1051+ ],
1052+ [
1053+ [1 , 2 , 3 , 4 ],
1054+ [1 , 3 , 2 ],
1055+ ],
1056+ [
1057+ [1 , 2 , 3 , 'a ' , 4.5 , new Set ([1 , 2 ])],
1058+ [1 , 2 ,'a ' , 4.5 , new Set ([1 , 2 ])],
1059+ ],
1060+ [
1061+ [1 , 2 , 3 , 'a ' , 4.5 , new Set ([1 , 2 ])],
1062+ [1 , 3 , 'a ' , 4.5 , new Set ([1 , 2 ])],
1063+ ],
1064+ [
1065+ [1 , 2 , 3 , 'a ' , 4.5 , new Set ([1 , 2 ]), -1 , -2 , 2.4 , 3.5 ],
1066+ [1 , 2 , 3 , 'a ' , 4.5 , new Set ([1 , 2 ]), -1 , -2 , 3.5 ],
1067+ ],
1068+ ];
1069+ }
1070+
1071+
1072+ /**
1073+ * @test
1074+ * @dataProvider dataProviderForIsSameSets
1075+ * @dataProvider dataProviderForIsProperSubset
1076+ */
1077+ public function testIsNotProperSuperset (array $ A , array $ B )
1078+ {
1079+ // Given
1080+ $ setA = new Set ($ A );
1081+ $ setB = new Set ($ B );
9821082
9831083 // Then
9841084 $ this ->assertFalse ($ setA ->isProperSuperset ($ setB ));
9851085 }
9861086
987- public function dataProviderForIsProperSet (): array
1087+ public function dataProviderForIsSameSets (): array
9881088 {
9891089 return [
9901090 [
0 commit comments