Yioop_V9.5_Source_Code_Documentation

VersionManagerTest extends UnitTest
in package

UnitTests for the VersionManager class.

Tags
author

Chris Pollett

Table of Contents

case_name  = "TestCase"
The suffix that all TestCase methods need to have to be called by run()
$current_method  : string
Contains the value of the next test case to be run can be used by setUp
$db  : object
our dbms manager handle so we can call unlinkRecursive
$test_case_results  : array<string|int, mixed>
Used to store the results for each test sub case
$test_objects  : array<string|int, mixed>
Used to hold objects to be used in tests
$version_test_folder  : string
Folder to use for test repository
__construct()  : mixed
Sets up a minimal DBMS manager class so that we will be able to use unlinkRecursive to tear down the files created bby our tests
assertEqual()  : mixed
Checks that $x and $y are the same, the result of the test is added to $this->test_case_results
assertFalse()  : mixed
Checks that $x can coerced to false, the result of the test is added to $this->test_case_results
assertNotEqual()  : mixed
Checks that $x and $y are not the same, the result of the test is added to $this->test_case_results
assertTrue()  : mixed
Checks that $x can coerced to true, the result of the test is added to $this->test_case_results
copyDeleteRenameTestCase()  : mixed
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).
createVersionFolderTestCase()  : mixed
Test the ability to create a new version of a folder within the VervionManager archive.
getPutContentsTestCase()  : mixed
Tests that we can put and get files from the head version of the managed folder's version archive.
restoreVersionTestCase()  : mixed
Tests restoring a folder to a given timestamp, making sure the correct files are present after the restore.
run()  : array<string|int, mixed>
Execute each of the test cases of this unit test and return the results
setUp()  : mixed
Does nothing
tearDown()  : mixed
Delete the files created associated with the VersionManager tests
versionGettersTestCase()  : mixed
Tests getting the active version of the repository at a given timestamp and between a range of timestamps

Constants

case_name

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

public mixed case_name = "TestCase"

Properties

$current_method

Contains the value of the next test case to be run can be used by setUp

public string $current_method

$test_case_results

Used to store the results for each test sub case

public array<string|int, mixed> $test_case_results

$test_objects

Used to hold objects to be used in tests

public array<string|int, mixed> $test_objects

$version_test_folder

Folder to use for test repository

public string $version_test_folder = \seekquarry\yioop\configs\TEST_DIR . "/test_files/version_manager_test"

Methods

__construct()

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

public __construct() : mixed
Return values
mixed

assertEqual()

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

public assertEqual(mixed $x, mixed $y[, string $description = "" ]) : mixed
Parameters
$x : mixed

a first item to compare

$y : mixed

a second item to compare

$description : string = ""

information about this test subcase

Return values
mixed

assertFalse()

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

public assertFalse(mixed $x[, string $description = "" ]) : mixed
Parameters
$x : mixed

item to check

$description : string = ""

information about this test subcase

Return values
mixed

assertNotEqual()

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

public assertNotEqual(mixed $x, mixed $y[, string $description = "" ]) : mixed
Parameters
$x : mixed

a first item to compare

$y : mixed

a second item to compare

$description : string = ""

information about this test subcase

Return values
mixed

assertTrue()

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

public assertTrue(mixed $x[, string $description = "" ]) : mixed
Parameters
$x : mixed

item to check

$description : string = ""

information about this test subcase

Return values
mixed

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).

public copyDeleteRenameTestCase() : mixed
Return values
mixed

createVersionFolderTestCase()

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

public createVersionFolderTestCase() : mixed
Return values
mixed

getPutContentsTestCase()

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

public getPutContentsTestCase() : mixed
Return values
mixed

restoreVersionTestCase()

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

public restoreVersionTestCase() : mixed
Return values
mixed

run()

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

public run([string $method = null ]) : array<string|int, mixed>
Parameters
$method : string = null

if not null then the method to run, else run all methods

Return values
array<string|int, mixed>

test case results

tearDown()

Delete the files created associated with the VersionManager tests

public tearDown() : mixed
Return values
mixed

versionGettersTestCase()

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

public versionGettersTestCase() : mixed
Return values
mixed

        

Search results