1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

96 Commits

Author SHA1 Message Date
Andy Chase
b8d9d7b79f [ticket/11620] Add extract_current_hostname
Add a tests for extracting the current hostname from session.

PHPBB3-11620
2013-07-05 14:09:50 -07:00
Andy Chase
7fd03abcab [ticket/11620] Add data provider to extract_page
These test cases were taken from a live session,
more test cases should be added to test specific
functionality in this function.

PHPBB3-11620
2013-07-05 14:09:49 -07:00
Andy Chase
9f156e9954 [ticket/11620] Rename class_functions_test -> extract_page_test
Renaming this file because it is going to contain a large data provider,
so I'd rather split this test out.

PHPBB3-11620
2013-07-05 14:09:48 -07:00
Andy Chase
e1d957c3ee [ticket/11620] Remove accidental argument from testable_facade.
PHPBB3-11620
2013-07-05 14:09:46 -07:00
Andy Chase
19a348e359 [ticket/11620] Add test for test_extract_current_page
PHPBB3-11620
2013-07-05 14:09:45 -07:00
Andy Chase
1d9d22cc76 [ticket/11620] Add testable facade for sessions.php
Since many functions in session.php have global variables inside the function,
this exposes those functions through a testable facade that uses testable_factory's
mock global variables to modify global variables used in the functions.

 This is using the facade pattern to provide a testable "front" to the functions in sessions.php.

 PHPBB3-11620
2013-07-05 14:09:44 -07:00
David King
73c289ae49 Merge remote-tracking branch 'Hardolaf/feature/auth-refactor' into develop
* Hardolaf/feature/auth-refactor: (44 commits)
  [feature/auth-refactor] Fix code style issue
  [feature/auth-refactor] Fix comment grammar
  [feature/auth-refactor] Fix the actual cause of test failures
  [feature/auth-refactor] A possible fix for the functional test failures
  [feature/auth-refactor] Forgot @inheritdoc on methods
  [feature/auth-refactor] Finish and clean up documentation
  [feature/auth-refactor] Change phpEx to php_ext in new classes
  [feature/auth-refactor] Fix two session tests broken by changes
  [feature/auth-refactor] Removed no longer used variable
  [feature/auth-refactor] Fix errors in acp_board
  [feature/auth-refactor] Fix indentation on acp_board
  [feature/auth-refactor] Refactor auth in acp_board
  [feature/auth-refactor] Don't truncate name then reattach same thing
  [feature/auth-refactor] Remove old auth plugins
  [feature/auth-refactor] Remove references to old auth plugins
  [feature/auth-refactor] Fix auth tests to use mock objects correctly
  [feature/auth-refactor] Test validate_session on provider_apache
  [feature/auth-refactor] Test autologin() on provider_apache
  [feature/auth-refactor] Test login() for provider_apache
  [feature/auth-refactor] Test for init on provider_apache
  ...
2013-07-03 12:46:18 -04:00
Andreas Fischer
d0f0704515 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/11615] Fix typo in creation_test
  [ticket/11615] Remove magic number in creation_test
  [ticket/11615] Rename class in file to match
  [ticket/11615] Rename init_test to creation_test for clarity
2013-06-27 01:12:34 +02:00
Andy Chase
7ba81a293f [ticket/11615] Fix typo in creation_test
PHPBB3-11615
2013-06-26 11:49:37 -07:00
Andy Chase
4c432fecc7 [ticket/11615] Remove magic number in creation_test
Removing this magic number to its own variable
with clean multiplication makes it clear
what the number represents.

PHPBB3-11615
2013-06-26 11:49:36 -07:00
Andy Chase
c29cca1a75 [ticket/11615] Rename class in file to match
PHPBB3-11615
2013-06-26 11:49:35 -07:00
Andy Chase
a105a6d7a7 [ticket/11615] Rename init_test to creation_test for clarity
PHPBB3-11615
2013-06-26 11:49:34 -07:00
Joseph Warner
19bbf7b7de [feature/auth-refactor] Fix two session tests broken by changes
PHPBB3-9734
2013-06-26 11:33:17 -04:00
Andreas Fischer
7f0fa6477f Merge remote-tracking branch 'p/ticket/11248' into develop
* p/ticket/11248:
  [ticket/11248] Convert line endings to LF - develop edition.
2012-12-22 23:25:54 +01:00
Oleg Pudeyev
03d2c6413c [ticket/11248] Convert line endings to LF - develop edition.
PHPBB3-11248
2012-12-07 21:57:33 -05:00
Oleg Pudeyev
dc649ad3cd [ticket/11248] Line endings to LF.
PHPBB3-11248
2012-12-05 20:11:00 -05:00
Oleg Pudeyev
3687febdac [ticket/11015] Change more docblocks.
PHPBB3-11015
2012-12-04 04:29:31 -05:00
Igor Wiedler
5e52216b5e Merge remote-tracking branch 'upstream/develop' into ticket/11015
* upstream/develop: (666 commits)
  [ticket/11077] Remove code from old global announcements system
  [ticket/11189] Replace DEBUG_EXTRA with DEBUG
  [ticket/11189] Always log critical errors when in cron or in image output
  [ticket/11187] Added a blank array to fix errors in functional tests
  [ticket/10780] Make L_COLON available in the installer.
  [ticket/11183] Remove $load_extensions and weird dl() calls
  [ticket/10970] Added extra documentation to parse_dynamic_path.
  [ticket/10939] Added documentation for phpbb_request::file
  [ticket/10865] Use code tags for install/database_update.php.
  [ticket/10865] Should have been a slash.
  [ticket/10780] Use L_COLON on LDAP page.
  [ticket/10780] Use L_COLON on search backend ACP pages.
  [ticket/10780] Use L_COLON for "download all attachments".
  [ticket/10780] Use colon from language in ucp_pm_compose.php where possible.
  [ticket/10780] Replace colons in phpBB/adm/style/acp_ext_details.html.
  [ticket/10780] Replace colon usage in adm template output with {L_COLON}
  [ticket/10780] Replace colon usage in template output with {L_COLON}
  [ticket/11181] Bump PHP requirement to 5.3.3 (from 5.3.2) [develop-olympus]
  [ticket/11181] Bump PHP requirement to 5.3.3 (from 5.3.2)
  [ticket/10172] Show prosilver birthday list even if there are no birthdays.
  ...

Conflicts:
	phpBB/common.php
	phpBB/download/file.php
	phpBB/includes/db/dbal.php
	phpBB/includes/db/firebird.php
	phpBB/includes/db/mssql.php
	phpBB/includes/db/mssql_odbc.php
	phpBB/includes/db/mssqlnative.php
	phpBB/includes/db/mysql.php
	phpBB/includes/db/mysqli.php
	phpBB/includes/db/oracle.php
	phpBB/includes/db/postgres.php
	phpBB/includes/db/sqlite.php
	phpBB/includes/extension/manager.php
	phpBB/install/database_update.php
2012-11-12 10:33:40 +01:00
David King
008cf967ab [feature/add_events] Re-fix broken test
PHPBB3-9550
2012-08-21 11:18:53 -04:00
Igor Wiedler
90a957ad26 [ticket/11015] Make DBAL classes autoloadable
PHPBB3-11015

This allows us to just create the object without having to include the
driver first. However, it also means that users must specify the full
class name in config.php
2012-07-21 18:11:14 +02:00
Andreas Fischer
d3bbde69c4 [ticket/10973] Drop all require_once for mocks. Use autoloading.
PHPBB3-10973
2012-07-08 22:57:23 +02:00
Andreas Fischer
a01e916737 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/9916] Changing header in non-distributed files
  [ticket/9916] Changing coding guidelines license
  [ticket/9916] Updating License in the header

Conflicts:
	tests/mock/cache.php
2012-01-02 17:36:21 +01:00
Unknown
17991823ea [ticket/9916] Updating License in the header
PHPBB3-9916
2012-01-02 16:18:32 +00:00
Oleg Pudeyev
7b4fd00ae5 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10483] Fix test suite when running with MySQL strict mode
2011-11-25 01:08:05 -05:00
Igor Wiedler
aef3652d7a [ticket/10483] Fix test suite when running with MySQL strict mode
PHPBB3-10483
2011-11-21 13:09:27 +01:00
Oleg Pudeyev
dce62b5271 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10321] Add descriptions to the unit tests
  [ticket/10321] Do not append the ? if the param-list is empty anyway.
2011-09-05 02:48:54 -04:00
Joas Schilling
5d66faafc1 [ticket/10321] Add descriptions to the unit tests
PHPBB3-10321
2011-08-21 18:56:47 +02:00
Joas Schilling
dc149a43e4 [ticket/10321] Do not append the ? if the param-list is empty anyway.
PHPBB3-10321
2011-08-21 13:16:05 +02:00
Igor Wiedler
b05382d226 [feature/request-class] Fix session_testable_factory
PHPBB3-9716
2011-08-19 00:13:34 +02:00
Andreas Fischer
d36f78b9f1 [ticket/10082] session_id is CHAR(32) not VARCHAR(32), so give them a CHAR(32).
This fixes session unit tests on PostgreSQL in particular.

PHPBB3-10082
2011-03-19 23:20:41 +01:00
Nils Adermann
921603b09e [task/session-tests] Make result check independent of returned row order.
PHPBB3-9732
2011-02-27 22:20:36 +01:00
Nils Adermann
bbf3864cb4 [task/session-tests] Correctly display message on session continue test failure
PHPBB3-9732
2011-02-27 22:16:39 +01:00
Nils Adermann
3d65c3c104 [task/session-tests] Make the session id replacement of dataset values clearer
PHPBB3-9732
2011-02-27 22:06:01 +01:00
Nils Adermann
cb56ab2dbd [ticket/10052] Add comments to the session testable factory.
PHPBB3-10052
2011-02-23 22:17:12 +01:00
Nils Adermann
11262afa93 [ticket/10052] Correct session tests, and separate session factory from tests
PHPBB3-10052
2011-02-23 18:33:20 +01:00
Oleg Pudeyev
6902ecf6a9 [ticket/10049] Mark session init test incomplete for now.
This test passes by itself but fails when run as part of the
compete suite. Mark it incomplete to avoid breaking the suite.

PHPBB3-10049
2011-02-20 08:53:15 -05:00
Oleg Pudeyev
c1e198e721 [ticket/10049] Mark session continue test incomplete for now.
I am unable to find any code revision in which this test worked.
Thus to not break the entire suite I mark it incomplete.

PHPBB3-10049
2011-02-20 08:45:59 -05:00
Oleg Pudeyev
f3ab9da0e9 [ticket/10049] Globalize $_SID.
PHPBB3-10049
2011-02-19 20:54:34 -05:00
Oleg Pudeyev
26b922ac3f [ticket/10049] Chase assertResultEquals rename.
cd694e9b9dfd59c8be00a52b30db8e6c280b97a9 renamed
assertResultEquals to assertSqlResultEquals. However, since the
session tests were never executed calls in them were never
updated.

Parameter order also changed; chase that too.

PHPBB3-10049
2011-02-19 20:54:08 -05:00
Oleg Pudeyev
0cf741f343 [ticket/10049] Fixed requires in session tests and mock.
PHPBB3-10049
2011-02-19 20:40:32 -05:00
Oleg Pudeyev
1abf7ad809 [ticket/10049] Renamed session test files to proper file names.
phpunit.xml.dist specifies that only files ending in _test.php
are test files; with the old names session tests were not run
as a result.

PHPBB3-10049
2011-02-19 20:30:46 -05:00
Nils Adermann
8538561b31 [task/session-tests] Test additional combinations of session_begin.
PHPBB3-9732
2011-01-20 22:49:38 +01:00
Nils Adermann
74f537e89d [task/session-tests] Added tests for the session class.
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
2011-01-20 22:47:48 +01:00
Oleg Pudeyev
1312e5b965 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10082] session_id is CHAR(32) not VARCHAR(32), so give them a CHAR(32).
2011-03-23 20:32:03 -04:00
Igor Wiedler
5913aef58f Merge branch 'develop-olympus' into develop
* develop-olympus:
  [task/session-tests] Make result check independent of returned row order.
  [task/session-tests] By default the cache check now skips over db server info
  [task/session-tests] Correctly display message on session continue test failure
  [task/session-tests] Make the session id replacement of dataset values clearer

Conflicts:
	tests/mock/cache.php
2011-02-27 22:52:56 +01:00
Nils Adermann
aae3bd0c72 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10052] Add comments to the session testable factory.
  [ticket/10052] Correct session tests, and separate session factory from tests
2011-02-24 01:12:53 +01:00