|
@@ 918-940 (lines=23) @@
|
| 915 |
|
|
| 916 |
|
} |
| 917 |
|
|
| 918 |
|
public function testAdvWidget() { |
| 919 |
|
|
| 920 |
|
ob_start(); |
| 921 |
|
$instance = array(); |
| 922 |
|
$instance['desc1'] = 'hello'; |
| 923 |
|
the_widget( 'geodiradvtwidget', $instance ); |
| 924 |
|
$output = ob_get_contents(); |
| 925 |
|
ob_end_clean(); |
| 926 |
|
$this->assertContains('hello', $output); |
| 927 |
|
|
| 928 |
|
ob_start(); |
| 929 |
|
$this->the_widget_form( 'geodiradvtwidget' ); |
| 930 |
|
$output = ob_get_contents(); |
| 931 |
|
ob_end_clean(); |
| 932 |
|
$this->assertContains('Your Advt code', $output); |
| 933 |
|
|
| 934 |
|
$new_instance = array( |
| 935 |
|
'desc1' => 'Advertise' |
| 936 |
|
); |
| 937 |
|
$output = $this->the_widget_form_update( 'geodiradvtwidget', $new_instance ); |
| 938 |
|
$this->assertContains('Advertise', $output['desc1']); |
| 939 |
|
|
| 940 |
|
} |
| 941 |
|
|
| 942 |
|
public function testFlickrWidget() { |
| 943 |
|
|
|
@@ 965-987 (lines=23) @@
|
| 962 |
|
|
| 963 |
|
} |
| 964 |
|
|
| 965 |
|
public function testTwitterWidget() { |
| 966 |
|
|
| 967 |
|
ob_start(); |
| 968 |
|
$instance = array(); |
| 969 |
|
$instance['gd_tw_desc1'] = 'hello'; |
| 970 |
|
the_widget( 'geodir_twitter', $instance ); |
| 971 |
|
$output = ob_get_contents(); |
| 972 |
|
ob_end_clean(); |
| 973 |
|
$this->assertContains('hello', $output); |
| 974 |
|
|
| 975 |
|
ob_start(); |
| 976 |
|
$this->the_widget_form( 'geodir_twitter' ); |
| 977 |
|
$output = ob_get_contents(); |
| 978 |
|
ob_end_clean(); |
| 979 |
|
$this->assertContains('Your twitter code', $output); |
| 980 |
|
|
| 981 |
|
$new_instance = array( |
| 982 |
|
'gd_tw_desc1' => 'hello' |
| 983 |
|
); |
| 984 |
|
$output = $this->the_widget_form_update( 'geodir_twitter', $new_instance ); |
| 985 |
|
$this->assertContains('hello', $output['gd_tw_desc1']); |
| 986 |
|
|
| 987 |
|
} |
| 988 |
|
|
| 989 |
|
public function testAdvSearchWidget() { |
| 990 |
|
|