| Conditions | 1 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function testStaticCallingMethod() |
||
| 34 | { |
||
| 35 | $className = SafeUrls::class; |
||
| 36 | $methodName = 'check'; |
||
| 37 | |||
| 38 | $testClass = new class() { |
||
| 39 | use StaticCalling; |
||
| 40 | }; |
||
| 41 | |||
| 42 | // Only testing with returned HTTP status, as Google Safebrowsing API not working as |
||
| 43 | // documented. See tests\Libraries\Curl\CurlTest testMalwareSocialEngineeringAnyPlatformUrl(). |
||
| 44 | $expected = 200; |
||
| 45 | $actual = json_decode( |
||
| 46 | $testClass->callStatic( |
||
| 47 | $className, $methodName, $this->urlsToTest |
||
| 48 | ), true |
||
| 49 | )['status']; |
||
| 50 | |||
| 51 | $this->assertEquals($expected, $actual); |
||
| 52 | } |
||
| 54 |