Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:tests:themelicenseservicetestable

This is an old revision of the document!


ThemeLicenseServiceTestable

Layer: Tests · Source: tests/unit/ThemeLicenseServiceTest.php:15 (lines 15–47)


class ThemeLicenseServiceTestable extends ThemeLicenseService

ThemeLicenseServiceTest

Unit tests for ThemeLicenseService: theme.ini parsing, premium detection, license API URL/body construction and response parsing. Network calls are captured through a testable subclass of post().

Docblock Metadata

^ Tag ^ Value ^
| ''@category'' | Tests |

Inheritance

^ Relation ^ Type ^ Meaning ^
| extends | [[scriptlog:lib:service:themelicenseservice|''ThemeLicenseService'']] | parent class/interface |

Constants (0)

None.

Properties (0)

None declared.

Methods (4)

^ Visibility ^ Method ^ Summary ^ Line ^
| public | ''getApiBaseUrl()'' | (undocumented) | 21 |
| public | ''getTimeout()'' | (undocumented) | 26 |
| protected | ''post()'' | (undocumented) | 34 |
| public | ''exposeParseResponse()'' | (undocumented) | 43 |

getApiBaseUrl()

public function getApiBaseUrl()

lines 21–24 (4)

Takes no parameters.

Returns: (none declared)

getTimeout()

public function getTimeout()

lines 26–32 (7)

Takes no parameters.

Returns: (none declared)

post()

protected function post($url, $body, $secret)

lines 34–41 (8)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$url'' | ''(untyped)'' | //required// | //none// |
| ''$body'' | ''(untyped)'' | //required// | //none// |
| ''$secret'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

exposeParseResponse()

public function exposeParseResponse($response, $httpCode)

lines 43–46 (4)

^ Parameter ^ Type ^ Default ^ Description ^
| ''$response'' | ''(untyped)'' | //required// | //none// |
| ''$httpCode'' | ''(untyped)'' | //required// | //none// |

Returns: (none declared)

Imports

^ Alias ^ Fully-qualified name ^
| ''ThemeLicenseService'' | [[scriptlog:lib:service:themelicenseservice|''Scriptlog\Service\ThemeLicenseService'']] |
| ''TestCase'' | ''PHPUnit\Framework\TestCase'' |

This page is generated from source by 'tools/gendoc'. Edits will be overwritten.

scriptlog/tests/themelicenseservicetestable.1790413766.txt.gz · Last modified: by admin