aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'github-igorw/feature/functional-tests' into ↵Nils Adermann2011-12-141-2/+10
|\ | | | | | | | | | | | | | | develop * github-igorw/feature/functional-tests: [feature/functional-tests] Introduce bootstrap method [feature/functional-tests] Make sure functional tests only install once
| * [feature/functional-tests] Introduce bootstrap methodIgor Wiedler2011-10-141-0/+8
| | | | | | | | PHPBB3-10414
| * [feature/functional-tests] Make sure functional tests only install onceIgor Wiedler2011-10-141-2/+2
| | | | | | | | | | | | | | The functional test setup bootstrapping should only be run once per class. PHPBB3-10414
* | Merge branch 'develop-olympus' into developOleg Pudeyev2011-12-031-38/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * develop-olympus: [ticket/10349] Removed duplicated functions from schema loading in tests [ticket/10349] Update function comment [ticket/10349] Use new schema comment function in installer [ticket/10349] Unit tests: Consolidate schema comment removal functions [ticket/10349] Unit tests: Remove comments while loading schema files
| * \ Merge remote-tracking branch 'Noxwizard/ticket/10349' into develop-olympusOleg Pudeyev2011-12-031-38/+7
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Noxwizard/ticket/10349: [ticket/10349] Removed duplicated functions from schema loading in tests [ticket/10349] Update function comment [ticket/10349] Use new schema comment function in installer [ticket/10349] Unit tests: Consolidate schema comment removal functions [ticket/10349] Unit tests: Remove comments while loading schema files
| | * | [ticket/10349] Removed duplicated functions from schema loading in testsPatrick Webster2011-10-291-43/+4
| | | | | | | | | | | | | | | | PHPBB3-10349
| | * | [ticket/10349] Update function commentPatrick Webster2011-09-281-2/+0
| | | | | | | | | | | | | | | | PHPBB3-10349
| | * | [ticket/10349] Unit tests: Consolidate schema comment removal functionsPatrick Webster2011-09-201-58/+11
| | | | | | | | | | | | | | | | PHPBB3-10349
| | * | [ticket/10349] Unit tests: Remove comments while loading schema filesPatrick Webster2011-09-031-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perform the same operations that the installer does when preparing the schema files. These functions come straight from /includes/functions_install.php and /includes/functions_admin.php. PHPBB3-10349
* | | | [ticket/10481] Use phar:// url for requiring goutte.Oleg Pudeyev2011-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It does not seem to work on my machine without phar:// even with phar extension installed. PHPBB3-10481
* | | | [ticket/10481] Skip functional tests if phar extension is missing.Oleg Pudeyev2011-11-241-1/+10
| | | | | | | | | | | | | | | | PHPBB3-10481
* | | | Merge branch 'develop-olympus' into developAndreas Fischer2011-10-171-0/+5
|\ \ \ \ | |/ / / | | | | | | | | | | | | * develop-olympus: [ticket/10416] Pass dbport to PDO object in ...connection_manager::connect().
| * | | [ticket/10416] Pass dbport to PDO object in ...connection_manager::connect().Andreas Fischer2011-10-161-0/+5
| |/ / | | | | | | | | | PHPBB3-10416
* | | [ticket/10417] Fix array_merge() on undefined $config variable.Andreas Fischer2011-10-161-2/+4
| |/ |/| | | | | PHPBB3-10417
* | [feature/functional-tests] Don't add elements to backup list twiceNils Adermann2011-10-141-7/+0
| | | | | | | | PHPBB3-10414
* | [feature/functional-tests] Generate config correctly and install only onceNils Adermann2011-10-142-24/+48
| | | | | | | | PHPBB3-10414
* | [feature/functional-tests] Configure functional tests through config fileNils Adermann2011-10-143-61/+87
| | | | | | | | | | | | The functional tests now also use the test database PHPBB3-10414
* | [feature/functional-tests] Implementing functional test framework with goutteIgor Wiedler2011-10-141-0/+128
| | | | | | | | PHPBB3-10414
* | Merge branch 'develop-olympus' into developAndreas Fischer2011-02-251-1/+1
|\ \ | |/ | | | | | | * develop-olympus: [ticket/10060] Fix test suite under MySQL
| * [ticket/10060] Fix test suite under MySQLIgor Wiedler2011-02-251-1/+1
| | | | | | | | | | | | | | Regression from PHPBB3-10043, a typo caused the database tests to fail under MySQL. PHPBB3-10060
* | Merge branch 'develop-olympus' into developNils Adermann2011-02-162-273/+358
|\ \ | |/ | | | | | | | | | | | | * develop-olympus: [task/refactor-db-testcase] Further improve error messages. [task/refactor-db-testcase] Do not show db password on connect error [task/refactor-db-testcase] Improve error message of db tests [task/refactor-db-testcase] Refactor phpbb_database_test_case
| * [task/refactor-db-testcase] Further improve error messages.Oleg Pudeyev2011-02-151-2/+2
| | | | | | | | PHPBB3-10043
| * [task/refactor-db-testcase] Do not show db password on connect errorIgor Wiedler2011-02-141-1/+2
| | | | | | | | PHPBB3-10043
| * [task/refactor-db-testcase] Improve error message of db testsIgor Wiedler2011-02-141-2/+11
| | | | | | | | | | | | | | | | | | | | | | If database tests cannot be run the error message is ambigous. This commit makes it clearer: - whether the supplied dbms is supported by us - which dbms are supported by us - whether the required PDO extension is loaded PHPBB3-10043
| * [task/refactor-db-testcase] Refactor phpbb_database_test_caseIgor Wiedler2011-02-142-273/+348
| | | | | | | | | | | | | | | | | | Move most of the methods to a separate connection manager class. The test case creates a manager to handle database creation, schema loading and more. Most of the methods could be simplified because they can access shared pdo, config and dbms data. PHPBB3-10043
* | [ticket/10013] Use mkdir to create directory trees.Oleg Pudeyev2011-02-121-5/+1
| | | | | | | | PHPBB3-10013
* | [ticket/10013] Fixed cache test to create intermediate directories.Oleg Pudeyev2011-02-121-0/+9
|/ | | | PHPBB3-10013
* [ticket/10011] Tests don't work on PHP < 5.3Erik Frèrejean2011-01-311-5/+5
| | | | | | | | Due to the usage of `__DIR__` for the file includes the tests can't be ran on systems with PHP < 5.3. Replace all occurances of `__DIR__` with `dirname(__FILE__)`. PHPBB3-10011
* [task/session-tests] Renamed assertSqlResultEquals and fixed its param orderNils Adermann2011-01-211-1/+1
| | | | PHPBB3-9732
* [task/session-tests] Added tests for the session class.Nils Adermann2011-01-201-0/+11
| | | | | | | | | | | Two first simple tests to check functionality of session_begin and session_create. Added a mock class for the cache as well as a subclass of session which has its cookie handling function mocked out to avoid header sending problems. PHPBB3-9732
* [task/phpunit-xml] Manually blacklisting a few PHPUnit classes from backups.Nils Adermann2011-01-072-0/+30
| | | | | | | | | | | The blacklisting of these static variables is necessary because code coverage will otherwise consume too much memory. The problem did not exist in earlier PHPUnit versions because all classes beginning with PHPUnit are automatically blacklisted, and code coverage as well as a few other internal classes were still internal parts of PHPunit. These were now moved to PHP_ namespace, causing the problem with backupStaticAttributes. PHPBB3-9967
* [task/phpunit-xml] Use phpunit.xml for test suiteIgor Wiedler2011-01-042-48/+5
| | | | PHPBB3-9967
* [task/mssql-db-tests] Split up database tests into SELECT and write operationsNils Adermann2010-10-251-5/+5
| | | | | | | SELECT is based on the user table fixture, write (INSERT/UPDATE/DELETE) is tested using the config table fixture. PHPBB3-9868
* [task/mssql-db-tests] Add support for odbc & sqlsrv PDO test connectionsNils Adermann2010-10-251-6/+94
| | | | PHPBB3-9868
* [task/mssql-db-tests] Refactored getConnection into multiple smaller parts.Nils Adermann2010-10-251-51/+84
| | | | | | | This is a first step to simplify the extraction of database specific code parts into separate classes. PHPBB3-9868
* [task/mssql-db-tests] Allow test configuration with environment variables.Nils Adermann2010-10-251-1/+12
| | | | | | | | | To allow execution of the tests with different configurations without having to use the test_config.php file, environment variables of the form PHPBB_TEST_<name> can now be used, e.g. PHPBB_TEST_DBMS to set the variables otherwise expected in test_config.php PHPBB3-9868
* [task/mssql-db-tests] No longer display an error when skipping db tests.Nils Adermann2010-10-252-70/+46
| | | | | | | | | | | | | Tests are run with sqlite by default now anyway, so in the majority of cases the error message explaining how to set up database test running will not be displayed anyway. Database tests are now generally simply skipped if no configuration can be found. The RUNNING_TESTS.txt file explains how to set them up however, and more info is available on the wiki. The get_database_config method was moved from test_case_helpers to database_test_case because it has no general purpose. PHPBB3-9868
* [task/mssql-db-tests] Use a simple getter for test case helpers.Nils Adermann2010-10-252-10/+10
| | | | | | | | Calling initialisation to then use the member directly seems more complicated than just having a method that returns the instance or creates it if necessary. PHPBB3-9868
* [ticket/9855] Do not include the PHPUnit Framework manually on 3.5+.Nils Adermann2010-10-171-2/+6
| | | | PHPBB3-9855
* [ticket/9825] Unit tests: Use sqlite when possible and no test_config exists.Andreas Fischer2010-09-161-11/+26
| | | | PHPBB3-9825
* [ticket/9592] Slight adjustments to simplify db test casesIgor Wiedler2010-09-151-11/+8
| | | | PHPBB3-9592
* [ticket/9592] Test suite does not run on SQliteIgor Wiedler2010-09-111-11/+47
| | | | PHPBB3-9592
* [feature/dbal-tests] Remove hardcoded 'mysql' from PDO DSN in DBAL test.Andreas Fischer2010-04-021-1/+1
|
* [feature/dbal-tests] Fix mysql (not mysqli) dbal test.Andreas Fischer2010-04-021-2/+4
| | | | Correctly determine MySQL version from the database.
* [feature/dbal-tests] Only output the missing config error message once.Nils Adermann2010-04-011-6/+18
| | | | | The error message was also not properly escaping the variables, thus producing an incorrect example configuration file.
* [feature/dbal-tests] Make the PDO prefix depend on the dbms.Nils Adermann2010-04-011-3/+13
| | | | | | The database base test will need a few more changes to run on all the databases we support. But those really need to be made on a system where they run and can be tested. Patches welcome!
* [feature/dbal-tests] Fix whitespace and line endings.Nils Adermann2010-04-011-2/+2
|
* [feature/dbal-tests] Make some tests for build_array_data on SELECTJoas Schilling2010-03-271-1/+68
|
* [feature/dbal-tests] Load phpbb-schema after creating the connection to the ↵Joas Schilling2010-03-262-3/+53
| | | | database
* [feature/dbal-tests] Added database test & refactored test frameworkJoas Schilling2010-03-264-20/+137
| | | | | | There is now a phpbb_database_test_case which can be used as a base class for tests that require database access. You have to set up a test_config.php file in your tests/ directory containing host, user, pass etc. Extra test functionality has been moved to phpbb_test_case_helpers to provide the same functionality in database tests and regular tests without duplicating the code. This is achieved through delegation of method calls.