PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/php/ignore_parameter_runme.php

#
PHP | 38 lines | 26 code | 9 blank | 3 comment | 0 complexity | 7fcbe4a33ce72dcae9003265c0ea5ae7 MD5 | raw file
 1<?php
 2
 3require "tests.php";
 4require "ignore_parameter.php";
 5
 6// New functions
 7check::functions(array(jaguar,lotus,tvr,ferrari,sportscars_daimler,sportscars_astonmartin,sportscars_bugatti,sportscars_lamborghini));
 8// New classes
 9check::classes(array(ignore_parameter,SportsCars,MiniCooper,MorrisMinor,FordAnglia,AustinAllegro));
10// No new vars
11check::globals(array());
12
13check::equal(jaguar(2,3.4),"hello",'jaguar(2,3.4)=="hello"');
14check::equal(lotus("eek",3.4),101,'lotus("eek",3.4)==101');
15check::equal(tvr("eek",2),8.8,'tvr("eek",2)==8.8');
16check::equal(ferrari(),101,'ferrari(2)==101');
17
18$sc=new sportscars();
19check::classname("sportscars",$sc);
20check::equal($sc->daimler(2,3.4),"hello",'$sc->daimler(2,3.4)=="hello"');
21check::equal($sc->astonmartin("eek",3.4),101,'$sc->mastonmartin("eek",3.4)==101');
22check::equal($sc->bugatti("eek",2),8.8,'$sc->bugatti("eek",2)==8.8');
23check::equal($sc->lamborghini(),101,'$sc->lamborghini(2)==101');
24
25$mc=new minicooper(2,3.4);
26check::classname("minicooper",$mc);
27
28$mm=new morrisminor("eek",3.4);
29check::classname("morrisminor",$mm);
30
31$fa=new fordanglia("eek",2);
32check::classname("fordanglia",$fa);
33
34$aa=new austinallegro();
35check::classname("austinallegro",$aa);
36
37check::done();
38?>