1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

643 Commits

Author SHA1 Message Date
Joas Schilling
7c09b5b89c [feature/soft-delete] Add some unit tests for delete_post()
PHPBB3-9567
2012-10-06 16:31:05 +02:00
Joas Schilling
b9d363f6cc [feature/soft-delete] Add unit tests for set_topic_visibility()
PHPBB3-9567
2012-10-05 14:26:09 +02:00
Joas Schilling
bfa6a50a4f [feature/soft-delete] Extend functionality for updating a hole topic
Limit the posts to a certain visibility and deletion time
This allows us to only restore posts, that were approved
when the topic got soft deleted. So previous soft deleted
and unapproved posts are still soft deleted/unapproved

PHPBB3-9567
2012-10-05 13:12:36 +02:00
Joas Schilling
63d11c976b [feature/soft-delete] Fix sync('topic') to match the new logic
This also fixes set_post_visibility()

PHPBB3-9567
2012-10-05 12:39:05 +02:00
Joas Schilling
959525cebe [feature/soft-delete] Merge functionality of m_approve and m_restore
The problems with having two different permissions are just too big and cause
huge queries, if they are granted differently. Also it's quite hard to decide
what should happen when a moderator has only one permission and the topic has
only posts of the two hidden types. To avoid all this, we merge them so it's a
simple switch: either the user is a moderator, then he can see all posts,
or he is not, then he can only see approved ones.

PHPBB3-9567
2012-10-05 12:05:22 +02:00
Joas Schilling
b8642d7c8a [feature/soft-delete] Test topic visibility as well
PHPBB3-9657
2012-10-05 11:04:56 +02:00
Joas Schilling
1f8f07b998 [feature/soft-delete] Add unit tests for simple cases of set_post_visibility
These tests require at least one remaining post.

PHPBB3-9657
2012-10-02 15:32:12 +02:00
Joas Schilling
c36c69c1d4 [feature/soft-delete] Remove unneeded require_once()
PHPBB3-9657
2012-10-02 12:54:47 +02:00
Joas Schilling
b629b2cd95 [feature/soft-delete] Add unit tests for get_global_visibility_sql()
PHPBB3-9657
2012-10-01 22:44:39 +02:00
Joas Schilling
4a65940e62 [feature/soft-delete] Add unit tests for get_forums_visibility_sql()
PHPBB3-9657
2012-10-01 22:14:04 +02:00
Joas Schilling
280619eea9 [feature/soft-delete] Add unit tests for get_visibility_sql()
PHPBB3-9657
2012-10-01 17:13:15 +02:00
Joas Schilling
38d83da69e [feature/soft-delete] Remove old unit tests
PHPBB3-9657
2012-10-01 16:38:28 +02:00
Josh Woody
1ab41f8dc6 [feature/soft-delete] Fix some small bugs
To wit: using non-existing constant POST_DELETED in posting.php; first test
post was initially unapproved; soft delete checkbox appeared at post time
Links pointing to the wrong place.

PHPBB3-9657
2012-08-29 17:50:12 +02:00
Josh Woody
a80cfafdd9 [feature/soft-delete] Rename phpbb_visibility class to phpbb_content_visibility
Rename the class to more accurately reflect what it does.

PHPBB3-9657
2012-08-29 17:50:11 +02:00
Josh Woody
6739375135 [feature/soft-delete] Add unit tests for the phpbb_visibility class
Add unit tests for the phpbb_visibility class.  Adjust the phpbb_visibility class to pass those unit tests.  The changes are pretty small, actually.

PHPBB3-9657
2012-08-29 17:50:11 +02:00
David King
310c906932 Merge remote-tracking branch 'nickvergessen/feature/php-events-4' into develop 2012-08-20 09:09:53 -04:00
Nils Adermann
dca9057559 Merge pull request #932 from EXreaction/ticket/10875
Ticket/10875
2012-08-14 02:30:49 -07:00
Joas Schilling
815e8ef9e1 [feature/php-events] Add mock for unit tests and create it were needed
PHPBB3-9550
2012-08-11 15:25:14 +02:00
Nathan Guse
4b7cdd4264 [ticket/10875] Fix cache test
Check for the correct filename based on the way the cache driver creates it

PHPBB3-10875
2012-08-06 18:43:46 -05:00
Nathan Guse
1db91af000 [ticket/10875] Break queries onto separate lines and use double quotes
Coding guidelines

PHPBB3-10875
2012-08-06 16:28:56 -05:00
Nathan Guse
44e48817c3 [ticket/10875] Close $db connection at end of test
Fixes a pgSQL issue

PHPBB3-10875
2012-08-06 16:26:55 -05:00
Nathan Guse
b64ac12bd5 [ticket/10875] Use fixtures for sql cache test
PHPBB3-10875
2012-08-06 16:26:55 -05:00
Nathan Guse
dcefa16318 [ticket/10875] Return $query_id from sql_save
Have to return the $query_id from sql_save so that the results can be pulled

Updated cache test to do some basic sql cache testing.

PHPBB3-10875
2012-08-06 16:26:55 -05:00
Andreas Fischer
17681c0770 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/11034] Re-arranged install order to emulate real install
2012-07-30 19:03:20 +02:00
Fyorl
647d395908 [ticket/11034] Re-arranged install order to emulate real install
PHPBB3-11034
2012-07-30 14:13:28 +01:00
Nils Adermann
da8d610011 Merge branch 'prep-release-3.0.11' into develop-olympus
* prep-release-3.0.11:
  [ticket/10667] Fix tests under MySQL 5.5 strict mode (once again)
2012-07-22 01:46:46 +02:00
Igor Wiedler
6ed63088fe [ticket/10667] Fix tests under MySQL 5.5 strict mode (once again)
PHPBB3-10667
2012-07-22 01:45:30 +02:00
Igor Wiedler
28c3ac2408 [ticket/10667] Fix tests under MySQL 5.5 strict mode (once again)
PHPBB3-10667
2012-07-21 19:28:55 +02:00
Igor Wiedler
87b278bda7 [ticket/11012] Fix php_ext change in mock_extension_manager
PHPBB3-11012
2012-07-21 16:31:26 +02:00
Nils Adermann
f7f78adeb9 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10950] Fix grammar in comments
  [ticket/10950] Delete PMs for users that have not yet read the pm
  [ticket/10950] Fix unit tests to fit the new pm deleting behaviour
  [ticket/10950] Update undelivered pm counts in batches not 1 by 1 for each user
  [ticket/10950] Remove deleted entries in tests instead of commenting them out
  [ticket/10950] Use database count() and group by instead of doing that in php
  [ticket/10950] Check $delete_ids to be not empty
  [ticket/10950] Recreated the behaviour of phpbb_delete_user_pms()
  [ticket/10950] Fix unit tests to reflect desired behaviour
  [ticket/10950] Add some first and simple unit tests for phpbb_delete_user_pms()
  [ticket/10950] Correct comment for the second query.
  [ticket/10950] Add empty line to make unset() call more visible.
  [ticket/10950] Select the correct columns in SQL queries.
  [ticket/10950] Use a variable for the private message id.
  [ticket/10950] Move array initialisation to the front.
  [ticket/10950] Remove redundant if statement.
  [ticket/10950] Fix SQL coding style (indentation) in second SQL query.
  [ticket/10950] Use proper ' in order to fix comment.
2012-07-21 16:15:42 +02:00
Nils Adermann
29bee5b01a Merge branch 'prep-release-3.0.11' into develop-olympus
* prep-release-3.0.11:
  [ticket/10950] Fix grammar in comments
  [ticket/10950] Delete PMs for users that have not yet read the pm
  [ticket/10950] Fix unit tests to fit the new pm deleting behaviour
  [ticket/10950] Update undelivered pm counts in batches not 1 by 1 for each user
  [ticket/10950] Remove deleted entries in tests instead of commenting them out
  [ticket/10950] Use database count() and group by instead of doing that in php
  [ticket/10950] Check $delete_ids to be not empty
  [ticket/10950] Recreated the behaviour of phpbb_delete_user_pms()
  [ticket/10950] Fix unit tests to reflect desired behaviour
  [ticket/10950] Add some first and simple unit tests for phpbb_delete_user_pms()
  [ticket/10950] Correct comment for the second query.
  [ticket/10950] Add empty line to make unset() call more visible.
  [ticket/10950] Select the correct columns in SQL queries.
  [ticket/10950] Use a variable for the private message id.
  [ticket/10950] Move array initialisation to the front.
  [ticket/10950] Remove redundant if statement.
  [ticket/10950] Fix SQL coding style (indentation) in second SQL query.
  [ticket/10950] Use proper ' in order to fix comment.
2012-07-21 16:15:32 +02:00
Nils Adermann
3dfcb212dc Merge remote-tracking branch 'github-nickvergessen/ticket/10950' into prep-release-3.0.11
* github-nickvergessen/ticket/10950:
  [ticket/10950] Fix grammar in comments
  [ticket/10950] Delete PMs for users that have not yet read the pm
  [ticket/10950] Fix unit tests to fit the new pm deleting behaviour
  [ticket/10950] Update undelivered pm counts in batches not 1 by 1 for each user
  [ticket/10950] Remove deleted entries in tests instead of commenting them out
  [ticket/10950] Use database count() and group by instead of doing that in php
  [ticket/10950] Check $delete_ids to be not empty
  [ticket/10950] Recreated the behaviour of phpbb_delete_user_pms()
  [ticket/10950] Fix unit tests to reflect desired behaviour
  [ticket/10950] Add some first and simple unit tests for phpbb_delete_user_pms()
  [ticket/10950] Correct comment for the second query.
  [ticket/10950] Add empty line to make unset() call more visible.
  [ticket/10950] Select the correct columns in SQL queries.
  [ticket/10950] Use a variable for the private message id.
  [ticket/10950] Move array initialisation to the front.
  [ticket/10950] Remove redundant if statement.
  [ticket/10950] Fix SQL coding style (indentation) in second SQL query.
  [ticket/10950] Use proper ' in order to fix comment.
2012-07-21 15:21:26 +02:00
Joas Schilling
a9c091fad4 [ticket/10950] Fix unit tests to fit the new pm deleting behaviour
Undelivered PMs should not be delivered to recipients that have not yet received them.

PHPBB3-10950
2012-07-20 17:08:54 +02:00
Nils Adermann
737828f009 Merge pull request #843 from nickvergessen/feature/new-tz-handling
Feature/new tz handling
2012-07-19 08:46:25 -07:00
Andreas Fischer
415a8c6786 Merge remote-tracking branch 'Fyorl/ticket/10992' into develop
* Fyorl/ticket/10992:
  [ticket/10992] Changed octetstream to octet-stream
  [ticket/10992] test_empty_file() now tries to upload the correct file
  [ticket/10992] Modified upload tests to work with new version
2012-07-19 17:08:38 +02:00
Andreas Fischer
db7b879b82 Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10981] Added check for PHP version before running composer
  [ticket/10981] Modified travis to use composer with --dev
  [ticket/10981] Removed setupBeforeClass
  [ticket/10981] Modified functional framework to account for goutte changes
  [ticket/10981] Added goutte via composer

Conflicts:
	.travis.yml
	composer.phar
	phpBB/composer.json
	phpBB/composer.lock
	tests/bootstrap.php
2012-07-19 16:59:45 +02:00
Andreas Fischer
3bbb882fe8 Merge remote-tracking branch 'Fyorl/ticket/10981' into develop-olympus
* Fyorl/ticket/10981:
  [ticket/10981] Added check for PHP version before running composer
  [ticket/10981] Modified travis to use composer with --dev
  [ticket/10981] Removed setupBeforeClass
  [ticket/10981] Modified functional framework to account for goutte changes
  [ticket/10981] Added goutte via composer
2012-07-19 16:40:33 +02:00
Joas Schilling
f3bd113d06 [feature/new-tz-handling] Fix unit test
PHPBB3-9558
2012-07-18 17:16:34 +02:00
Joas Schilling
f4136eacdc Merge branch 'develop' of git://github.com/phpbb/phpbb3 into feature/new-tz-handling 2012-07-18 11:07:32 +02:00
Fyorl
7a412f846a [ticket/10981] Removed setupBeforeClass
PHPBB3-10981
2012-07-17 21:39:48 +01:00
Nils Adermann
a3757763ac Merge branch 'develop-olympus' into develop
* develop-olympus:
  [ticket/10678] Typo and formatting
  [ticket/10678] Add port handling for MSSQL tests
  [ticket/10678] Move config changes to new location
  [ticket/10678] Rename helper class file
  [ticket/10678] Lowercase class name, adjust comment width
  [ticket/10678] More formatting and docblocks
  [ticket/10678] More formatting requests
  [ticket/10678] Fix formatting
  [ticket/10678] Add better support for Firebird, Oracle, and MSSQL
2012-07-17 21:13:05 +02:00
Nils Adermann
4a87bc2aa9 Merge remote-tracking branch 'github-noxwizard/ticket/10678' into develop-olympus
* github-noxwizard/ticket/10678:
  [ticket/10678] Typo and formatting
  [ticket/10678] Add port handling for MSSQL tests
  [ticket/10678] Move config changes to new location
  [ticket/10678] Rename helper class file
  [ticket/10678] Lowercase class name, adjust comment width
  [ticket/10678] More formatting and docblocks
  [ticket/10678] More formatting requests
  [ticket/10678] Fix formatting
  [ticket/10678] Add better support for Firebird, Oracle, and MSSQL

Conflicts:
	tests/RUNNING_TESTS.txt
2012-07-17 21:12:47 +02:00
Andreas Fischer
6980b3dcfd Merge remote-tracking branch 'nickvergessen/ticket/10942' into develop
* nickvergessen/ticket/10942:
  [ticket/10942] Avoid possible conflicts with magic words in unit tests
  [ticket/10942] Add access modifiers
  [ticket/10942] Use ANSI SQL standard || in dbal.php
  [ticket/10942] Fix up unit tests for sql_case()
  [ticket/10942] Require same data type and do not cast expressions automatically
  [ticket/10942] Make unit tests for sql_case simpler
  [ticket/10942] Add a comment why we cast to sql_case()
  [ticket/10942] Rename method sql_conditional() to sql_case()
  [ticket/10942] Change term string to expression to avoid confusion
  [ticket/10942] Fix sql_conditional for mssql, postgre and oracle
  [ticket/10942] Fix function name on order_lower_test.php
  [ticket/10942] Add unit tests for sql_concatenate
  [ticket/10942] Add sql_concatenate to dbal
  [ticket/10942] Add unit tests for sql_conditional
  [ticket/10942] Add sql_conditional to dbal
2012-07-17 17:59:56 +02:00
Fyorl
d88411e10d [ticket/10981] Modified functional framework to account for goutte changes
PHPBB3-10981
2012-07-16 17:52:03 +01:00
Fyorl
797ee16eaf [ticket/10981] Added goutte via composer
composer.phar added and autoloaded before tests

PHPBB3-10981
2012-07-16 17:52:03 +01:00
Fyorl
fa4eaeb306 [ticket/10992] Changed octetstream to octet-stream
PHPBB3-10992
2012-07-16 18:24:45 +02:00
Fyorl
e9a1189bfc [ticket/10992] test_empty_file() now tries to upload the correct file
PHPBB3-10992
2012-07-16 18:24:35 +02:00
Fyorl
91050356d3 [ticket/10992] Modified upload tests to work with new version
PHPBB3-10992
2012-07-16 18:24:16 +02:00
Joas Schilling
1b826842aa [ticket/10942] Avoid possible conflicts with magic words in unit tests
PHPBB3-10942
2012-07-16 16:59:40 +02:00
Joas Schilling
d883535b10 [ticket/10950] Remove deleted entries in tests instead of commenting them out
PHPBB3-10950
2012-07-11 13:05:36 +02:00