diff --git a/classes/ComicPressMediaHandling.inc b/classes/ComicPressMediaHandling.inc index b01b4a5..57e95d7 100644 --- a/classes/ComicPressMediaHandling.inc +++ b/classes/ComicPressMediaHandling.inc @@ -1,6 +1,8 @@ default_filter; + } + + function get_comic_path($source = 'comic', $override_post = null, $filter = 'default', $multi = false) { + + } } diff --git a/test/ComicPressMediaHandlingTest.php b/test/ComicPressMediaHandlingTest.php index 7b841ce..603f53e 100644 --- a/test/ComicPressMediaHandlingTest.php +++ b/test/ComicPressMediaHandlingTest.php @@ -26,4 +26,24 @@ class ComicPressMediaHandlingTest extends PHPUnit_Framework_TestCase { 'mini' => 'mini' ), $this->cpmh->_bundle_global_variables()); } + + function providerTestGetFilter() { + return array( + array(null, '%wordpress%/%type-folder%/%date-Y-m-d%*.*'), + array('fail', '%wordpress%/%type-folder%/%date-Y-m-d%*.*'), + array(array(), '%wordpress%/%type-folder%/%date-Y-m-d%*.*'), + array('test', 'test') + ); + } + + /** + * @dataProvider providerTestGetFilter + */ + function testGetFilter($filter_to_use, $expected_result) { + global $comic_filename_filters; + + $comic_filename_filters['test'] = 'test'; + + $this->assertEquals($expected_result, $this->cpmh->_get_filter($filter_to_use)); + } } diff --git a/test/widgets/GraphicalNavigationWidgetTest.php b/test/widgets/GraphicalNavigationWidgetTest.php index cab99c2..709acf4 100644 --- a/test/widgets/GraphicalNavigationWidgetTest.php +++ b/test/widgets/GraphicalNavigationWidgetTest.php @@ -10,9 +10,6 @@ class GraphicalNavigationWidgetTest extends PHPUnit_Framework_TestCase { $this->w = new GraphicalNavigationWidget(); } - /** - * @covers WidgetComicPressGraphicalStorylineNavigation::update - */ function testUpdateWidget() { $result = $this->w->update(array( "next" => "test", @@ -41,7 +38,6 @@ class GraphicalNavigationWidgetTest extends PHPUnit_Framework_TestCase { /** * @dataProvider providerTestIsNavLinkVisible - * @covers WidgetComicPressGraphicalStorylineNavigation::_will_display_nav_link */ function testIsNavLinkVisible($which, $current_id, $target_id, $expected_result) { $current = (object)array('ID' => $current_id); @@ -76,7 +72,6 @@ class GraphicalNavigationWidgetTest extends PHPUnit_Framework_TestCase { /** * @dataProvider providerTestGroupNavigationButtons - * @covers WidgetComicPressGraphicalStorylineNavigation::_group_navigation_buttons */ function testGroupNavigationButtons($buttons, $expected_grouping) { _set_filter_expectation('comicpress_navigation_grouping_details', array(array(