remove a bunch of tests and methods no longer needed
This commit is contained in:
parent
261fce60d5
commit
93f1e856b7
|
@ -428,14 +428,6 @@ class ComicPressStoryline {
|
|||
return $this;
|
||||
}
|
||||
|
||||
function &include_children($parent = null) {
|
||||
return $this->_include('_find_children', $parent);
|
||||
}
|
||||
|
||||
function &exclude_children($parent = null) {
|
||||
return $this->_exclude('_find_children', $parent);
|
||||
}
|
||||
|
||||
function _find_level_or_above($level = null) {
|
||||
$found = array();
|
||||
foreach ($this->_structure as $category_id => $info) {
|
||||
|
@ -444,14 +436,6 @@ class ComicPressStoryline {
|
|||
return $found;
|
||||
}
|
||||
|
||||
function &include_level_or_above($level = null) {
|
||||
return $this->_include('_find_level_or_above', $level);
|
||||
}
|
||||
|
||||
function &exclude_level_or_above($level = null) {
|
||||
return $this->_exclude('_find_level_or_above', $level);
|
||||
}
|
||||
|
||||
function _find_only($id = null) {
|
||||
if (isset($this->_structure[$id])) {
|
||||
return array($id);
|
||||
|
@ -459,14 +443,6 @@ class ComicPressStoryline {
|
|||
return array();
|
||||
}
|
||||
|
||||
function &include_only($id = null) {
|
||||
return $this->_include('_find_only', $id);
|
||||
}
|
||||
|
||||
function &exclude_only($id = null) {
|
||||
return $this->_exclude('_find_only', $id);
|
||||
}
|
||||
|
||||
function _find_level($level = null) {
|
||||
$found = array();
|
||||
foreach ($this->_structure as $category_id => $info) {
|
||||
|
@ -475,14 +451,6 @@ class ComicPressStoryline {
|
|||
return $found;
|
||||
}
|
||||
|
||||
function &include_level($id = null) {
|
||||
return $this->_include('_find_level', $id);
|
||||
}
|
||||
|
||||
function &exclude_level($id = null) {
|
||||
return $this->_exclude('_find_level', $id);
|
||||
}
|
||||
|
||||
function _find_post_category($post = null) {
|
||||
$found = array();
|
||||
|
||||
|
@ -501,14 +469,6 @@ class ComicPressStoryline {
|
|||
return $found;
|
||||
}
|
||||
|
||||
function &include_post_category($post = null) {
|
||||
return $this->_include('_find_post_category', $post);
|
||||
}
|
||||
|
||||
function &exclude_post_category($post = null) {
|
||||
return $this->_exclude('_find_post_category', $post);
|
||||
}
|
||||
|
||||
function _find_adjacent($category = null, $next = false) {
|
||||
$found = array();
|
||||
|
||||
|
@ -524,15 +484,6 @@ class ComicPressStoryline {
|
|||
return $found;
|
||||
}
|
||||
|
||||
function &include_adjacent($category = null, $next = false) {
|
||||
return $this->_include('_find_adjacent', $category, $next);
|
||||
}
|
||||
|
||||
function &exclude_adjacent($category = null, $next = false) {
|
||||
return $this->_exclude('_find_adjacent', $category, $next);
|
||||
}
|
||||
|
||||
|
||||
function end_search() {
|
||||
$result = $this->_category_search;
|
||||
$this->_category_search = array();
|
||||
|
@ -579,7 +530,8 @@ class ComicPressStoryline {
|
|||
$method = $method_type; break;
|
||||
}
|
||||
if (!empty($method)) {
|
||||
call_user_func_array(array($this, "${method_root}_${method}"), $args);
|
||||
array_unshift($args, "_find_${method}");
|
||||
call_user_func_array(array($this, "_${method_root}"), $args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
RT('previous', 'from_post'); the_title(); echo '<br />';
|
||||
RT('previous'); the_title(); echo '<br />';
|
||||
Restore(); the_title(); echo '<br />';
|
||||
RT('next'); the_title(); echo '<br />';
|
||||
RT('next', array('child_of' => 'amoc')); the_title(); echo '<br />';
|
||||
RT('next', 'from_post'); the_title(); echo '<br />';
|
||||
RT('last', 'from_post'); the_title(); echo '<br />';
|
||||
|
||||
|
|
|
@ -368,26 +368,6 @@ class ComicPressStorylineTest extends PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals(array(2,3,4), $this->css->_find_children($search));
|
||||
}
|
||||
|
||||
function testIncludeChildren() {
|
||||
$css = $this->getMock('ComicPressStoryline', array('_find_children'));
|
||||
$css->expects($this->once())->method('_find_children')->will($this->returnValue(array(2,3,4)));
|
||||
$css->_category_search = array(4,5);
|
||||
|
||||
$css->include_children(2);
|
||||
|
||||
$this->assertEquals(array(2,3,4,5), $css->_category_search);
|
||||
}
|
||||
|
||||
function testExcludeChildren() {
|
||||
$css = $this->getMock('ComicPressStoryline', array('_find_children'));
|
||||
$css->expects($this->once())->method('_find_children')->will($this->returnValue(array(2,3,4)));
|
||||
$css->_category_search = array(4, 5, 6);
|
||||
|
||||
$css->exclude_children(2);
|
||||
|
||||
$this->assertEquals(array(5, 6), $css->_category_search);
|
||||
}
|
||||
|
||||
function testFindLevelOrAbove() {
|
||||
$this->css->_structure = array(
|
||||
'1' => array('next' => 2, 'level' => 1),
|
||||
|
@ -399,26 +379,6 @@ class ComicPressStorylineTest extends PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals(array(1, 2), $this->css->_find_level_or_above(2));
|
||||
}
|
||||
|
||||
function testIncludeLevelOrAbove() {
|
||||
$css = $this->getMock('ComicPressStoryline', array('_find_level_or_above'));
|
||||
$css->expects($this->once())->method('_find_level_or_above')->will($this->returnValue(array(2,3,4)));
|
||||
$css->_category_search = array(4,5);
|
||||
|
||||
$css->include_level_or_above(2);
|
||||
|
||||
$this->assertEquals(array(2,3,4,5), $css->_category_search);
|
||||
}
|
||||
|
||||
function testExcludeLevelOrAbove() {
|
||||
$css = $this->getMock('ComicPressStoryline', array('_find_level_or_above'));
|
||||
$css->expects($this->once())->method('_find_level_or_above')->will($this->returnValue(array(2,3,4)));
|
||||
$css->_category_search = array(4, 5, 6);
|
||||
|
||||
$css->exclude_level_or_above(2);
|
||||
|
||||
$this->assertEquals(array(5, 6), $css->_category_search);
|
||||
}
|
||||
|
||||
function testEndSearch() {
|
||||
$this->css->_category_search = array(1,2,3);
|
||||
$this->assertEquals(array(1,2,3), $this->css->end_search());
|
||||
|
@ -514,7 +474,7 @@ class ComicPressStorylineTest extends PHPUnit_Framework_TestCase {
|
|||
$this->assertEquals($expected_return, $this->css->_find_adjacent($category, $which));
|
||||
}
|
||||
|
||||
function providerTestBuildFromRestrictions() {
|
||||
function providerTestBuildFromRestrictions() {
|
||||
return array(
|
||||
array(
|
||||
null,
|
||||
|
|
Loading…
Reference in New Issue