LGV_TZ_Lookup 1.4.2
Time zone lookup for PHP applications and HTTP clients
Loading...
Searching...
No Matches
demo.php File Reference

These are the fast checks for the demo's reference geometry and cleanup guards. More...

Go to the source code of this file.

Functions

 demoCheck ($expected, $actual, string $label)
 This compares one test result with its expected value.
 demoFeature (string $zone, array $rings)
 This constructs the decoded Feature fields needed by the reference collector.

Variables

 $cases
 $checks
 This counts successful assertions in the fast demo checks.
 $circle
 $directory
 $environment ['LGV_TZ_DEMO_PORT']
 $environment
 $error
 $firstEdge
 $hole
 $outer
 $process
 $source
 $vertices
 finally
 try

Detailed Description

© Copyright 2023-2026, Little Green Viper Software Development LLC

LICENSE:

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Little Green Viper Software Development LLC

Run composer test:demo after installing development dependencies. Small, known geometries check holes, ocean fallback, boundary offsets, and decoding-block transitions. Cleanup checks invoke a separate worker with test records that are refused before any database operation. No download or running MySQL server is required.

Definition in file demo.php.

Function Documentation

◆ demoCheck()

demoCheck ( $expected,
$actual,
string $label )
Exceptions
RuntimeExceptionif the values differ, including a description of the failed check.
Parameters
$expectedThe independently specified value expected from the check.
$actualThe value returned by the operation under test.
$labelThe description included in a failure message.

Definition at line 46 of file demo.php.

References $checks, and demoCheck().

Referenced by demoCheck().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ demoFeature()

demoFeature ( string $zone,
array $rings )
Returns
: A Polygon geometry and its properties.tzid value.
Parameters
$zoneThe zone label for the test geometry.
$ringsThe exterior ring, followed by any hole rings.

Definition at line 61 of file demo.php.

References $rings, and demoFeature().

Referenced by demoFeature().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ $cases

$cases

Definition at line 82 of file demo.php.

Referenced by DemoSourceGeometry\casesForLargest().

◆ $checks

$checks

Definition at line 40 of file demo.php.

◆ $circle

$circle

Definition at line 93 of file demo.php.

◆ $directory

◆ $environment [1/2]

$environment[ 'LGV_TZ_DEMO_PORT']

Definition at line 129 of file demo.php.

◆ $environment [2/2]

$environment

Definition at line 128 of file demo.php.

◆ $error

$error

Definition at line 116 of file demo.php.

◆ $firstEdge

$firstEdge

Definition at line 84 of file demo.php.

◆ $hole

$hole

Definition at line 69 of file demo.php.

◆ $outer

$outer

Definition at line 68 of file demo.php.

◆ $process

$process

Definition at line 113 of file demo.php.

Referenced by deployAsk().

◆ $source

$source

Definition at line 67 of file demo.php.

Referenced by deployCopyTree().

◆ $vertices

$vertices

Definition at line 94 of file demo.php.

◆ finally

finally

Definition at line 141 of file demo.php.

◆ try

try

Definition at line 109 of file demo.php.