swig/Examples/test-suite/php/li_factory_runme.php
Olly Betts 32283991c5 Don't generate a .php wrapper file by default
It's now only generated if something to put in it is specified via:

%pragma(php) include=...

or

%pragma(php) code=...
2021-05-04 14:14:56 +12:00

20 lines
407 B
PHP

<?php
require "tests.php";
// No new functions
check::functions(array());
// New classes
check::classes(array('Geometry','Point','Circle'));
// No new vars
check::globals(array());
$circle = Geometry::create(Geometry::CIRCLE);
$r = $circle->radius();
check::equal($r, 1.5, "r failed");
$point = Geometry::create(Geometry::POINT);
$w = $point->width();
check::equal($w, 1.0, "w failed");
check::done();