@@ 103-110 (lines=8) @@ | ||
100 | $this->assertFalse($foo->isNullInstanceOf($var, $instanceof)); |
|
101 | } |
|
102 | ||
103 | public function testIsNullInstanceOfWhenPassedStringToCheck() |
|
104 | { |
|
105 | $var = new \stdClass(); |
|
106 | $instanceof = get_class($var); |
|
107 | ||
108 | $foo = new testType(); |
|
109 | $this->assertFalse($foo->isNullInstanceOf($var, $instanceof)); |
|
110 | } |
|
111 | ||
112 | public function testIsNullInstanceOfWhenPassedNonObjectToCheck() |
|
113 | { |
|
@@ 130-137 (lines=8) @@ | ||
127 | $this->assertTrue($foo->isNullInstanceOf($var, $instanceof)); |
|
128 | } |
|
129 | ||
130 | public function testIsValidArrayNotEnoughBitz() |
|
131 | { |
|
132 | $arr = []; |
|
133 | $instanceof = get_class(new \stdClass()); |
|
134 | ||
135 | $foo = new testType(); |
|
136 | $this->assertFalse($foo->isValidArray($arr, $instanceof, 1, -1)); |
|
137 | } |
|
138 | ||
139 | public function testIsValidArrayTooManyBitz() |
|
140 | { |
|
@@ 139-146 (lines=8) @@ | ||
136 | $this->assertFalse($foo->isValidArray($arr, $instanceof, 1, -1)); |
|
137 | } |
|
138 | ||
139 | public function testIsValidArrayTooManyBitz() |
|
140 | { |
|
141 | $arr = ['abc']; |
|
142 | $instanceof = get_class(new \stdClass()); |
|
143 | ||
144 | $foo = new testType(); |
|
145 | $this->assertFalse($foo->isValidArray($arr, $instanceof, 0, 0)); |
|
146 | } |
|
147 | ||
148 | public function testIsValidArrayWrongType() |
|
149 | { |
|
@@ 148-155 (lines=8) @@ | ||
145 | $this->assertFalse($foo->isValidArray($arr, $instanceof, 0, 0)); |
|
146 | } |
|
147 | ||
148 | public function testIsValidArrayWrongType() |
|
149 | { |
|
150 | $arr = ['abc']; |
|
151 | $instanceof = get_class(new \stdClass()); |
|
152 | ||
153 | $foo = new testType(); |
|
154 | $this->assertFalse($foo->isValidArray($arr, $instanceof)); |
|
155 | } |
|
156 | ||
157 | public function testIsValidArrayRightType() |
|
158 | { |
|
@@ 157-164 (lines=8) @@ | ||
154 | $this->assertFalse($foo->isValidArray($arr, $instanceof)); |
|
155 | } |
|
156 | ||
157 | public function testIsValidArrayRightType() |
|
158 | { |
|
159 | $arr = [new \stdClass()]; |
|
160 | $instanceof = get_class(new \stdClass()); |
|
161 | ||
162 | $foo = new testType(); |
|
163 | $this->assertTrue($foo->isValidArray($arr, $instanceof)); |
|
164 | } |
|
165 | ||
166 | public function testIsChildArrayOkForEmptyArray() |
|
167 | { |