set up function tests area
This commit is contained in:
parent
923bda444d
commit
a818df4f4d
|
@ -170,10 +170,10 @@ function comicpress_load_options() {
|
||||||
'buy_print_add_shipping' => false,
|
'buy_print_add_shipping' => false,
|
||||||
'buy_print_us_ship' => '4.95',
|
'buy_print_us_ship' => '4.95',
|
||||||
'buy_print_int_ship' => '9.95',
|
'buy_print_int_ship' => '9.95',
|
||||||
|
|
||||||
'enable_comicpress_debug' => true,
|
'enable_comicpress_debug' => true,
|
||||||
'enable_full_post_check' => false
|
'enable_full_post_check' => false
|
||||||
|
|
||||||
) as $field => $value) {
|
) as $field => $value) {
|
||||||
$comicpress_options[$field] = $value;
|
$comicpress_options[$field] = $value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<?php
|
|
@ -10,8 +10,8 @@ function cp_add_to_feed_count_rss() {
|
||||||
$feedcount = get_option('comicpress_feed_count_rss');
|
$feedcount = get_option('comicpress_feed_count_rss');
|
||||||
if (!empty($feedcount)) {
|
if (!empty($feedcount)) {
|
||||||
$feedcount = $feedcount + 1;
|
$feedcount = $feedcount + 1;
|
||||||
update_option('comicpress_feed_count_rss', $feedcount);
|
update_option('comicpress_feed_count_rss', $feedcount);
|
||||||
} else {
|
} else {
|
||||||
add_option('comicpress_feed_count_rss', 1, ' ', 'yes');
|
add_option('comicpress_feed_count_rss', 1, ' ', 'yes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,8 @@ function cp_add_to_feed_count_rdf() {
|
||||||
$feedcount = get_option('comicpress_feed_count_rdf');
|
$feedcount = get_option('comicpress_feed_count_rdf');
|
||||||
if (!empty($feedcount)) {
|
if (!empty($feedcount)) {
|
||||||
$feedcount = $feedcount + 1;
|
$feedcount = $feedcount + 1;
|
||||||
update_option('comicpress_feed_count_rdf', $feedcount);
|
update_option('comicpress_feed_count_rdf', $feedcount);
|
||||||
} else {
|
} else {
|
||||||
add_option('comicpress_feed_count_rdf', 1, ' ', 'yes');
|
add_option('comicpress_feed_count_rdf', 1, ' ', 'yes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,8 +36,8 @@ function cp_add_to_feed_count_atom() {
|
||||||
$feedcount = get_option('comicpress_feed_count_atom');
|
$feedcount = get_option('comicpress_feed_count_atom');
|
||||||
if (!empty($feedcount)) {
|
if (!empty($feedcount)) {
|
||||||
$feedcount = $feedcount + 1;
|
$feedcount = $feedcount + 1;
|
||||||
update_option('comicpress_feed_count_atom', $feedcount);
|
update_option('comicpress_feed_count_atom', $feedcount);
|
||||||
} else {
|
} else {
|
||||||
add_option('comicpress_feed_count_atom', 1, ' ', 'yes');
|
add_option('comicpress_feed_count_atom', 1, ' ', 'yes');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
<?php
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
require_once('PHPUnit/Framework.php');
|
||||||
|
require_once('MockPress/mockpress.php');
|
||||||
|
require_once(dirname(__FILE__) . '/../../functions/syndication.php');
|
||||||
|
|
||||||
|
class SyndicationTest extends PHPUnit_Framework_TestCase {
|
||||||
|
function providerTestTheTitleRSS() {
|
||||||
|
return array(
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO Add get_comments_number to MockPress
|
||||||
|
* @dataProvider providerTestTheTitleRSS
|
||||||
|
*/
|
||||||
|
function testTheTitleRSS($number_of_comments, $expected_title) {
|
||||||
|
$this->markTestIncomplete();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue