com php/gtk-src: Added brackets around if on gtk_cell_layou t_get_cells override in ext/gtk+/gtk-2.12.o verrides Added test/GtkCellLayout/get_cells.phpt: e xt/gtk+/gtk-2.12.overrides tests/GtkCellLayout/get _cells.phpt
[email protected] (Elizabeth Marie Smith) Wed, 07 Nov 2012 17:53:44 +0000
| Newsgroups | php.gtk.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: bc19302b392d2c5499b548ccc7a01fc1cc9299f9=0AAuthor: orlando <o=
rlando@orlando-Latitude-E6410.(none)> Wed, 7 Nov 2012 14:53:44 -030=
0=0AParents: ec48a455fd2151a8573250f221d175b405a35bab=0ABranches: master=
=0A=0ALink: http://git.php.net/?p=3Dphp/gtk-src.git;a=3Dcommitdiff;h=
=3Dbc19302b392d2c5499b548ccc7a01fc1cc9299f9=0A=0ALog:=0AAdded brackets arou=
nd if on gtk_cell_layout_get_cells override in ext/gtk+/gtk-2.12.overrides=
=0AAdded test/GtkCellLayout/get_cells.phpt=0A=0AChanged paths:=0A M ext/g=
tk+/gtk-2.12.overrides=0A A tests/GtkCellLayout/get_cells.phpt=0A=0A=0ADi=
ff:=0Adiff --git a/ext/gtk+/gtk-2.12.overrides b/ext/gtk+/gtk-2.12.override=
s=0Aindex 8728b56..f779014 100644=0A--- a/ext/gtk+/gtk-2.12.overrides=0A+++=
b/ext/gtk+/gtk-2.12.overrides=0A@@ -685,8 +685,9 @@ PHP_METHOD=0A =0A =
NOT_STATIC_METHOD();=0A =0A- if (!php_gtk_parse_args(ZEND_NUM_ARGS(), ""=
))=0A+ if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "")){=0A return;=
=0A+ }=0A =0A list =3D gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(PHP=
G_GOBJECT(this_ptr)));=0A =0Adiff --git a/tests/GtkCellLayout/get_cells.php=
t b/tests/GtkCellLayout/get_cells.phpt=0Anew file mode 100644=0Aindex 00000=
00..4fc0fa6=0A--- /dev/null=0A+++ b/tests/GtkCellLayout/get_cells.phpt=0A@@=
-0,0 +1,43 @@=0A+--TEST--=0A+GtkCellLayout->get_cells method=0A+--SKIPIF--=
=0A+<?php=0A+if(!extension_loaded('php-gtk')) die('skip - PHP-GTK extension=
not available');=0A+if($error =3D Gtk::check_version(2, 18, 0)) die('skip =
-requires GTK 2.18 or higher ' . $error);=0A+?>=0A+--INI--=0A+error_reporti=
ng =3D E_ALL | E_DEPRECATED;=0A+--FILE--=0A+<?php=0A+=0A+// Use any class t=
hat implements the GtkCellLayout interface=0A+=0A+// First try empty =0A+$c=
olumn =3D new GtkTreeViewColumn();=0A+=0A+var_dump($column->get_cells());=
=0A+=0A+// Giving a paramenter should result in warning=0A+var_dump($column=
->get_cells(1));=0A+=0A+unset($column);=0A+=0A+// Now lets try with a cell =
renderer=0A+$column =3D new GtkTreeViewColumn("test", new GtkCellRendererTe=
xt(), "text", 0);=0A+=0A+// Should return an array=0A+var_dump($column->get=
_cells());=0A+=0A+?>=0A+--EXPECTF--=0A+array(0) {=0A+}=0A+PHP Warning: Gtk=
TreeViewColumn::get_cells() expects exactly 0 parameters, 1 given in %s on =
line %d=0A+NULL=0A+array(1) {=0A+ [0]=3D>=0A+ object(GtkCellRendererText)=
#2 (1) {=0A+ ["gtype"]=3D>=0A+ int(%i)=0A+ }=0A+}=0A