seek_quarry
[ class tree: seek_quarry ] [ index: seek_quarry ] [ all elements ]

Class: UnitTest

Source Location: /lib/unit_test.php

Class Overview


Base class for all the SeekQuarry/Yioop engine Unit tests


Author(s):

  • Chris Pollett

Variables

Constants

Methods


Child classes:

BloomFilterFileTest
Used to test that the BloomFilterFile class provides the basic functionality of a persistent set. I.e., we can insert things into it, and we can do membership testing
EpubProcessorTest
UnitTest for the EpubProcessor class. An EpubProcessor is used to process a .epub (ebook publishing standard) file and extract summary from it. This class tests the processing of an .epub file format by EpubProcessor.
HashTableTest
Used to test that the HashTable class properly stores key value pairs, handles insert, deletes, collisions okay. It should also detect when table is full
IndexShardTest
Used to test that the StringArray class properly stores/retrieves values, and can handle loading and saving
ItStemmerTest
My code for testing the Italian stemming algorithm. The inputs for the
PhraseParserTest
Used to test that the PhraseParser class. Want to make sure bigram extracting works correctly
PptxProcessorTest
UnitTest for the PptxProcessor class. It is used to process pptx files which are xml based zip format
PriorityQueueTest
Used to test the PriorityQueue class that is used to figure out which URL to crawl next
QueueServerTest
Used to test functions related to scheduling websites to crawl for a web crawl (the responsibility of a QueueServer)
StringArrayTest
Used to test that the StringArray class properly stores/retrieves values, and can handle loading and saving
TrieTest
Used to test that the Trie class properly stores words that could be used for an autosuggest dictionary
UrlParserTest
Used to test that the UrlParser class. For now, want to see that the method canonicalLink is working correctly and that isPathMemberRegexPaths (used in robot_processor.php) works
WebArchiveTest
UnitTest for the WebArchive class. A web archive is used to store array-based objects persistently to a file. This class tests storing and retreiving from such an archive.
WebQueueBundleTest
UnitTest for the WebQueueBundle class.
XlsxProcessorTest
Used to test that the XlsxProcessor class provides the basic functionality of getting the tile, description, languages and links

Class Details

[line 43]
Base class for all the SeekQuarry/Yioop engine Unit tests



Tags:

author:  Chris Pollett
abstract:  


[ Top ]


Class Variables

$test_case_results =

[line 49]

Used to store the results for each test sub case


Type:   mixed


[ Top ]

$test_objects =

[line 54]

Used to hold objects to be used in tests


Type:   array


[ Top ]



Class Methods


constructor __construct [line 63]

UnitTest __construct( )

Contructor should be overriden to do any set up that occurs before

and test cases




Overridden in child classes as:

WebQueueBundleTest::__construct()
Sets up a miminal DBMS manager class so that we will be able to use

[ Top ]

method assertEqual [line 141]

void assertEqual( mixed $x, mixed $y, [string $description = ""])

Checks that $x and $y are the same, the result of the test is added to $this->test_case_results



Parameters:

mixed   $x   a first item to compare
mixed   $y   a second item to compare
string   $description   information about this test subcase

[ Top ]

method assertFalse [line 120]

void assertFalse( mixed $x, [string $description = ""])

Checks that $x can coerced to false, the result of the test is added to $this->test_case_results



Parameters:

mixed   $x   item to check
string   $description   information about this test subcase

[ Top ]

method assertNotEqual [line 162]

void assertNotEqual( mixed $x, mixed $y, [string $description = ""])

Checks that $x and $y are not the same, the result of the test is added to $this->test_case_results



Parameters:

mixed   $x   a first item to compare
mixed   $y   a second item to compare
string   $description   information about this test subcase

[ Top ]

method assertTrue [line 100]

void assertTrue( mixed $x, [string $description = ""])

Checks that $x can coerced to true, the result of the test is added to $this->test_case_results



Parameters:

mixed   $x   item to check
string   $description   information about this test subcase

[ Top ]

method run [line 71]

array run( )

Execute each of the test cases of this unit test and return the results



Tags:

return:  test case results


[ Top ]

method setUp [line 179]

void setUp( )

This method is called before each test case is run to set up the

given test case




Tags:

abstract:  


Overridden in child classes as:

BloomFilterFileTest::setUp()
Set up a bloom filter that can store up to 10 items and that saves
EpubProcessorTest::setUp()
Creates a new EpubProcessor object so that we can process an .epub format file.
HashTableTest::setUp()
We'll use two different tables one more representative of how the table
IndexShardTest::setUp()
Construct some index shard we can add documents to
ItStemmerTest::setUp()
PhraseParserTest::setUp()
PhraseParser uses static methods so doesn't do anything right now
PptxProcessorTest::setUp()
Creates a summary of pptx document to check
PriorityQueueTest::setUp()
We setup two queue one that always returns the max element, one that
QueueServerTest::setUp()
Creates a QueueServer object with an initial set of indexed file types
StringArrayTest::setUp()
We'll use two different tables one more representative of how the table
TrieTest::setUp()
We'll set up one Trie for testing purpose
UrlParserTest::setUp()
UrlParser uses static methods so doesn't do anything right now
WebArchiveTest::setUp()
Creates a new web archive object that we can add objects to
WebQueueBundleTest::setUp()
Set up a web queue bundle that can store 1000 urls in ram, has bloom filter space for 1000 urls and which uses a maximum value returning priority queue.
XlsxProcessorTest::setUp()
sets up the initial content for the testcase by extracting

[ Top ]

method tearDown [line 184]

void tearDown( )

This method is called after each test case is run to clean up



Tags:

abstract:  


Overridden in child classes as:

BloomFilterFileTest::tearDown()
Since a BloomFilterFile is a PersistentStructure it periodically saves
EpubProcessorTest::tearDown()
Delete any files associated with our test on EpubProcessor
HashTableTest::tearDown()
Since a HashTable is a PersistentStructure it periodically saves
IndexShardTest::tearDown()
Deletes any index shard files we may have created
ItStemmerTest::tearDown()
PhraseParserTest::tearDown()
PhraseParser uses static methods so doesn't do anything right now
PptxProcessorTest::tearDown()
Test object is set to null
PriorityQueueTest::tearDown()
Since our queues are persistent structures, we delete files that might be
QueueServerTest::tearDown()
Used to get rid of any object/files we created during a test case.
StringArrayTest::tearDown()
Since a StringArray is a PersistentStructure it periodically saves
TrieTest::tearDown()
Since a Trie is not a PersistentStructure we don't need to do
UrlParserTest::tearDown()
UrlParser uses static methods so doesn't do anything right now
WebArchiveTest::tearDown()
Delete any files associated with out test web archive
WebQueueBundleTest::tearDown()
Delete the directory and files associated with the WebQueueBundle
XlsxProcessorTest::tearDown()
Can be used for clenup activity

[ Top ]


Class Constants

case_name =  "TestCase"

[line 58]

The suffix that all TestCase methods need to have to be called by run()


[ Top ]



Documentation generated by phpDocumentor 1.4.3