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