end category searches

This commit is contained in:
John Bintz 2009-11-05 22:32:32 -05:00
parent 3fda650af7
commit b2198c25c2
2 changed files with 11 additions and 0 deletions

View File

@ -413,6 +413,12 @@ class ComicPressStoryline {
sort($this->_category_search); sort($this->_category_search);
return $this; return $this;
} }
function end_search() {
$result = $this->_category_search;
$this->_category_search = array();
return $result;
}
} }
?> ?>

View File

@ -393,6 +393,11 @@ class ComicPressStorylineTest extends PHPUnit_Framework_TestCase {
$this->assertEquals(array(5, 6), $css->_category_search); $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());
$this->assertEquals(array(), $this->css->_category_search);
}
} }
?> ?>