\seekquarry\yioop\testsVersionManagerTest

UnitTests for the VersionManager class.

Summary

Methods
Properties
Constants
__construct()
run()
assertTrue()
assertFalse()
assertEqual()
assertNotEqual()
setUp()
tearDown()
createVersionFolderTestCase()
getPutContentsTestCase()
copyDeleteRenameTestCase()
restoreVersionTestCase()
versionGettersTestCase()
$test_case_results
$test_objects
$db
$version_test_folder
case_name
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

case_name

case_name

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

Properties

$test_case_results

$test_case_results : 

Used to store the results for each test sub case

Type

$test_objects

$test_objects : array

Used to hold objects to be used in tests

Type

array

$db

$db : object

our dbms manager handle so we can call unlinkRecursive

Type

object

$version_test_folder

$version_test_folder : string

Folder to use for test repository

Type

string

Methods

__construct()

__construct() 

Sets up a miminal DBMS manager class so that we will be able to use unlinkRecursive to tear down the files created bby our tests

run()

run() : array

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

Returns

array —

test case results

assertTrue()

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

assertFalse()

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

assertEqual()

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

assertNotEqual()

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

setUp()

setUp() 

Does nothing

tearDown()

tearDown() 

Delete the files created associated with the VersionManager tests

createVersionFolderTestCase()

createVersionFolderTestCase() 

Test the ability to create a new version of a folder within the VervionManager archive.

getPutContentsTestCase()

getPutContentsTestCase() 

Tests that we can put and get files from the head version of the managed folder's version archive.

copyDeleteRenameTestCase()

copyDeleteRenameTestCase() 

Tests file manipulations that can be done on files in the head version of the repository. (copy a file, rename a file, delete a file).

restoreVersionTestCase()

restoreVersionTestCase() 

Tests restoring a folder to a given timestamp, making sure the correct files are present after the restore.

versionGettersTestCase()

versionGettersTestCase() 

Tests getting the active version of the repository at a given timestamp and between a range of timestamps