com php/gtk-src: Add new signal test - the skipif is a little flakey but should skip properly for 2.24 only: tests/GtkAboutDialog/activate-link-signal.phpt
[email protected] (Elizabeth Marie Smith) Fri, 20 Jul 2012 02:37:52 +0000
| Newsgroups | php.gtk.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: b61309dadbde98ecf24aff58e0379709aa5c8a0e=0AAuthor: Elizabeth = M Smith <[email protected]> Thu, 19 Jul 2012 22:37:52 -0400= =0AParents: dd9dad8fe4daadb101314f99dd8db4f333c176e3=0ABranches: master= =0A=0ALink: http://git.php.net/?p=3Dphp/gtk-src.git;a=3Dcommitdiff;h= =3Db61309dadbde98ecf24aff58e0379709aa5c8a0e=0A=0ALog:=0AAdd new signal test= - the skipif is a little flakey=0Abut should skip properly for 2.24 only= =0A=0AChanged paths:=0A A tests/GtkAboutDialog/activate-link-signal.phpt= =0A=0A=0ADiff:=0Adiff --git a/tests/GtkAboutDialog/activate-link-signal.php= t b/tests/GtkAboutDialog/activate-link-signal.phpt=0Anew file mode 100644= =0Aindex 0000000..71dc484=0A--- /dev/null=0A+++ b/tests/GtkAboutDialog/acti= vate-link-signal.phpt=0A@@ -0,0 +1,21 @@=0A+--TEST-- +GtkAboutDialog::activate-link signal +--SKIPIF-- +<?php +if(!extension_loaded('php-gtk')) die('skip - PHP-GTK extension not availab= le'); +if(!method_exists('GtkNotebook', 'set_group_name')) die('skip - GtkAboutDi= alog::activate-link not available, requires GTK 2.24 or higher'); +?> +--FILE-- +<?php +function activate_link_callback($label, $uri) { +=09var_dump($uri); +=09var_dump($label instanceof GtkLabel); +=09return true; +} +$dialog =3D new GtkAboutDialog(); +$dialog->connect('activate-link', 'activate_link_callback'); +$dialog->emit('activate-link', 'http://foobar'); +?> +--EXPECTF-- +string(13) "http://foobar" +bool(false)=0A\ No newline at end of file=0A