/** * @dataProvider providerTestGetCategoriesToExclude */ function testGetCategoriesToExclude($category, $expected_results) { $dbi = ComicPressDBInterface::get_instance(); $dbi->_all_categories = array(1, 2, 3, 4); $dbi->_non_comic_categories = array(1, 4); $this->assertEquals($expected_results, $dbi->_get_categories_to_exclude($category)); }
function testSingleton() { $a = ComicPressDBInterface::get_instance(); $this->assertTrue(!isset($a->test)); $a->test = "test"; $this->assertEquals("test", $a->test); $b = ComicPressDBInterface::get_instance(); $this->assertEquals("test", $b->test); }