/trunk/Examples/test-suite/php/director_string_runme.php
PHP | 34 lines | 22 code | 9 blank | 3 comment | 0 complexity | 6b83e63df4be0fff9a63651ed942f371 MD5 | raw file
1<?php 2 3require "tests.php"; 4require "director_string.php"; 5 6// No new functions 7check::functions(array(a_get_first,a_call_get_first,a_string_length,a_process_text,a_call_process_func,stringvector_size,stringvector_is_empty,stringvector_clear,stringvector_push,stringvector_pop,stringvector_capacity,stringvector_reserve)); 8// No new classes 9check::classes(array(A,StringVector)); 10// now new vars 11check::globals(array(a,a_call,a_m_strings,stringvector)); 12 13class B extends A { 14 function get_first() { 15 return parent::get_first() . " world!"; 16 } 17 18 function process_text($string) { 19 parent::process_text($string); 20 $this->smem = "hello"; 21 } 22} 23 24$b = new B("hello"); 25 26$b->get(0); 27check::equal($b->get_first(),"hello world!", "get_first failed"); 28 29$b->call_process_func(); 30 31check::equal($b->smem, "hello", "smem failed"); 32 33check::done(); 34?>