Elizabeth Marie Smith
2012-07-20 02:37:52 UTC
Commit: b61309dadbde98ecf24aff58e0379709aa5c8a0e
Author: Elizabeth M Smith <***@gmail.com> Thu, 19 Jul 2012 22:37:52 -0400
Parents: dd9dad8fe4daadb101314f99dd8db4f333c176e3
Branches: master
Link: http://git.php.net/?p=php/gtk-src.git;a=commitdiff;h=b61309dadbde98ecf24aff58e0379709aa5c8a0e
Log:
Add new signal test - the skipif is a little flakey
but should skip properly for 2.24 only
Changed paths:
A tests/GtkAboutDialog/activate-link-signal.phpt
Diff:
diff --git a/tests/GtkAboutDialog/activate-link-signal.phpt b/tests/GtkAboutDialog/activate-link-signal.phpt
new file mode 100644
index 0000000..71dc484
--- /dev/null
+++ b/tests/GtkAboutDialog/activate-link-signal.phpt
@@ -0,0 +1,21 @@
+--TEST--
+GtkAboutDialog::activate-link signal
+--SKIPIF--
+<?php
+if(!extension_loaded('php-gtk')) die('skip - PHP-GTK extension not available');
+if(!method_exists('GtkNotebook', 'set_group_name')) die('skip - GtkAboutDialog::activate-link not available, requires GTK 2.24 or higher');
+?>
+--FILE--
+<?php
+function activate_link_callback($label, $uri) {
+ var_dump($uri);
+ var_dump($label instanceof GtkLabel);
+ return true;
+}
+$dialog = new GtkAboutDialog();
+$dialog->connect('activate-link', 'activate_link_callback');
+$dialog->emit('activate-link', 'http://foobar');
+?>
+--EXPECTF--
+string(13) "http://foobar"
+bool(false)
\ No newline at end of file
Author: Elizabeth M Smith <***@gmail.com> Thu, 19 Jul 2012 22:37:52 -0400
Parents: dd9dad8fe4daadb101314f99dd8db4f333c176e3
Branches: master
Link: http://git.php.net/?p=php/gtk-src.git;a=commitdiff;h=b61309dadbde98ecf24aff58e0379709aa5c8a0e
Log:
Add new signal test - the skipif is a little flakey
but should skip properly for 2.24 only
Changed paths:
A tests/GtkAboutDialog/activate-link-signal.phpt
Diff:
diff --git a/tests/GtkAboutDialog/activate-link-signal.phpt b/tests/GtkAboutDialog/activate-link-signal.phpt
new file mode 100644
index 0000000..71dc484
--- /dev/null
+++ b/tests/GtkAboutDialog/activate-link-signal.phpt
@@ -0,0 +1,21 @@
+--TEST--
+GtkAboutDialog::activate-link signal
+--SKIPIF--
+<?php
+if(!extension_loaded('php-gtk')) die('skip - PHP-GTK extension not available');
+if(!method_exists('GtkNotebook', 'set_group_name')) die('skip - GtkAboutDialog::activate-link not available, requires GTK 2.24 or higher');
+?>
+--FILE--
+<?php
+function activate_link_callback($label, $uri) {
+ var_dump($uri);
+ var_dump($label instanceof GtkLabel);
+ return true;
+}
+$dialog = new GtkAboutDialog();
+$dialog->connect('activate-link', 'activate_link_callback');
+$dialog->emit('activate-link', 'http://foobar');
+?>
+--EXPECTF--
+string(13) "http://foobar"
+bool(false)
\ No newline at end of file
--
PHP-GTK CVS Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
PHP-GTK CVS Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php