Commit graph

288 commits

Author SHA1 Message Date
Philipp Holzer
4e374fa4d3 Fixed AutomaticInstallationConsoleTest 2019-03-22 23:25:24 -04:00
Philipp Holzer
d4b23ca8b9 Fixing some AutomaticInstallationConsoleTests 2019-03-22 23:25:23 -04:00
Philipp Holzer
c5973beca4 Fixing some AutomaticInstallationConsoleTests 2019-03-22 23:25:23 -04:00
Philipp Holzer
bef952bd16 Fixed ConfigConsoleTest 2019-03-22 23:25:22 -04:00
Philipp Holzer
acd5060ec2 Fixed ConsoleTest 2019-03-22 23:23:50 -04:00
Philipp Holzer
f4ec7c47b9 Bugfix ConfigCacheLoaderTest 2019-03-22 23:23:49 -04:00
Philipp Holzer
1b45d3fad7 testfix - namespaces 2019-03-22 22:56:58 -04:00
Philipp Holzer
f3c4e6fa3d testfix - namespaces 2019-03-22 22:56:58 -04:00
Philipp Holzer
8c6e6b5dea
Fixing .htconfig 2019-03-16 20:31:10 +01:00
Philipp Holzer
1acd5c7d22
- Adding additional legacy .htconfig information 2019-03-16 20:06:53 +01:00
Philipp Holzer
07bd4cec65
Fixing redis cachekey 2019-03-04 21:28:36 +01:00
Philipp Holzer
def502ae2d
Fix namespaces 2019-02-27 12:32:56 +01:00
Philipp Holzer
5fc42a744e
Replace string namespaces with ::class 2019-02-24 13:40:54 +01:00
Philipp Holzer
1dee89f215
fixing tests and preload config 2019-02-23 00:09:57 +01:00
Hypolite Petovan
256e845c5d
Merge pull request #6641 from nupplaphil/config_followup
Config FollowUp
2019-02-17 17:56:31 -05:00
Philipp Holzer
f5adbd268b
Fixing tests 2019-02-17 21:41:45 +01:00
Philipp Holzer
e1d9d67632
renamed Logger::setLogger() to Logger::init() 2019-02-17 20:44:08 +01:00
Philipp Holzer
80f1feabe5
Refactoring Logging to use Configuration 2019-02-17 20:43:52 +01:00
Philipp Holzer
eafcf3592d
Config FollowUp
- New Configuration (Config is now only holding the instance)
- New PConfiguration (PConfig is now only holding the instance)

- Config & PConfig-Adapter don't need "ConfigCache" anymore

- DB-Connection is now outside App->reload() for better dependency-chaining
2019-02-17 20:40:27 +01:00
Philipp Holzer
88fd871844
refactoring & test fixing 2019-02-17 01:18:21 +01:00
Philipp Holzer
11a7f97fe7
friendica-6667 Installer needs to check fileinfo module 2019-02-16 22:17:34 +01:00
Philipp Holzer
199ceeadbf
Adding ConfigCacheLoaderTest 2019-02-10 13:39:48 +01:00
Philipp Holzer
2a42f8dded
Adding ConfigCacheTest 2019-02-10 12:30:13 +01:00
Philipp Holzer
cb791024e4
Refactor ConfigMockTrait to mocked ConfigCache 2019-02-07 20:44:03 +01:00
Philipp Holzer
90e88d6c35
Bugfixing AutomaticInstallation test 2019-02-04 00:04:16 +01:00
Philipp Holzer
835b5c00ee
ConsoleTest is now a MockedTest 2019-02-02 19:21:48 +01:00
Philipp Holzer
433d6abe8c
Refactoring DBA-mocking tests
- Reducing DB-dependencies
- Creating DB-cache mocks
- Creating DB-lock mocks
- Switching to mocked dependencies for Cache/Lock/App
2019-02-02 19:03:15 +01:00
Hypolite Petovan
cef6757c92 Replace REGISTER_* constants by Module\Register::* ones 2019-01-22 22:24:15 -05:00
Michael Vogel
94eca77041
Merge pull request #6315 from MrPetovan/bug/6309-add-fulltext-index-profile
Rework mod/match and mod/msearch
2018-12-27 18:04:06 +01:00
Hypolite Petovan
acaee626f5 Remove include/ requires that are now done directly from Composer 2018-12-24 09:56:25 -05:00
Michael
75e63212d1 Bite by bite ... 2018-12-22 22:56:57 +00:00
Michael
6a501d99af And again tests ... 2018-12-22 22:36:53 +00:00
Michael
732308ce6d Hopefully this fixes the tests again 2018-12-22 22:04:47 +00:00
Hypolite Petovan
458981f75c Replace x() by isset(), !empty() or defaults()
- Remove extraneous parentheses around empty() calls
- Remove duplicate calls to intval(), count() or strlen() after empty()
- Replace ternary operators outputting binary value with empty() return value
- Rewrite defaults() without x()
2018-11-30 09:06:22 -05:00
Hypolite Petovan
0c21bd488f Use constants instead of strings for register_policy 2018-11-26 07:40:44 -05:00
Hypolite Petovan
c964e193b9 Replace *.ini.php by *.config.php in comments 2018-11-25 01:44:51 -05:00
Hypolite Petovan
98d90e131d Update install to generate config/local.config.php 2018-11-25 01:44:09 -05:00
Philipp Holzer
7aae40ae6a
skipping TTL tests 2018-11-09 20:39:47 +01:00
Philipp Holzer
c2bd69e351
Lock TTL fix 2018-11-05 08:51:35 +01:00
Philipp Holzer
83ead5ec48
Test enhancements 2018-11-01 13:44:47 +01:00
Philipp Holzer
70f9d3c596
documentation 2018-11-01 12:48:43 +01:00
Philipp Holzer
4f01a198e1
AutoInstall Test fix
- New Mock for Renderer
- No need of prepared assert.ini.php anymore
- Mocking Renderer during Autoinstall
2018-11-01 10:30:44 +01:00
Philipp Holzer
764e1a3cb6
Fixing issue L10n::t() 2018-10-31 12:37:52 +01:00
Philipp Holzer
d75cc0cb34
Bugfixing executable (Mocking the executable) 2018-10-31 12:37:47 +01:00
Philipp Holzer
92d3d77e76
Bufixing environment specific assertion problem 2018-10-31 11:03:15 +01:00
Philipp Holzer
70e240691e
Moved Mocking usage
Adding more documentation
2018-10-31 10:39:50 +01:00
Philipp Holzer
551efde226
removed unnecessary use 2018-10-31 10:19:33 +01:00
Philipp Holzer
0e22c18a9d
Bugfixing & Enhancement
- Added Mocking Engine for App, DBA, Config
- Using Mocking Engine for AutomaticInstallationConsoleTest
- Using Mocking Engine for ConfigConsoleTest

- Removing MultiUserConsole - Workaround
2018-10-31 10:16:15 +01:00
Philipp Holzer
91f595000c
Mocking DBStructure::existsTable() 2018-10-30 12:47:44 +01:00
Philipp Holzer
cf39c9df81
Bugfixings
- moved testargs.php to util directory
- Switch Environment check before config at automatic install
- checkPHP() is now finding the PHP binary too
- Bugfixing checkPHP() & required returned wrong status
- removing not used $_POST['phpath'] in web installer
2018-10-30 11:30:19 +01:00
Philipp Holzer
f0382ab919
Refactoring Installation
- centralized installation
- renamed Core\Install to Core\Installer
- avoid using $a->data[] for states
- removed unnecessary code
2018-10-29 18:44:39 +01:00
Philipp Holzer
abb50fbf62
Install to Module
- Move Install to Module
- Some Bugfixings
2018-10-29 14:10:45 +01:00
Michael Vogel
d61a98a995
Merge pull request #6008 from nupplaphil/fixing_tests_2
Fixing tests - part 2
2018-10-23 14:23:59 +02:00
Philipp Holzer
a79daf3946
Fixing tests - part 2 2018-10-23 13:53:48 +02:00
Philipp Holzer
3e6ea9383b
Making redirect message more informative 2018-10-23 12:17:41 +02:00
Philipp Holzer
4a82708cbf
Fix Testing 2018-10-22 20:59:51 +02:00
Philipp Holzer
c32ac7f194
Install Class to methods
- Bugfixing Install checks (worked not as expected)
- Changed static methods from Install to class functions
- Added tests
2018-10-13 18:09:53 +02:00
Philipp Holzer
5a02e39a65
Rename App Methods
- renamed a lot of App methods to CamelCase
- replaced direct public variables with get-/set-Methods
2018-10-10 00:16:06 +02:00
Hypolite Petovan
3bccaccede
Merge pull request #5848 from nupplaphil/friendica-5847
friendica-5847 Console Cache List command doesn't work
2018-10-07 17:47:51 -04:00
Philipp Holzer
3f0f3b6ae6
friendica-5847 Console Cache List command doesn't work
- Added $prefix to all CacheDriver
- Moved hostname magic to CacheDriver
- Added test for getAllKeys()
2018-10-07 00:27:54 +02:00
Philipp Holzer
31148e25cf
Changing Friendica\App\Mode from static methods to public methods
- Changing from static methods to public methods
- Adding dev-composer-dependency Mockery for static method mocking (f.e. Config, DBA)
- Adding ModeTest with Mocking
- removing bootstrap from phpunit.xml because of double loading tests\bootstrap.php
2018-10-06 16:27:20 +02:00
Philipp Holzer
924b21623c
Fixing tests for AutomaticInstallation 2018-10-05 19:51:14 +02:00
Philipp Holzer
bd2b3b1ef5
LockDriverFixings
- release Locks in case of failures
- adding some cache tests
2018-09-06 08:11:18 +02:00
Philipp Holzer
f148dcabc4
CacheLockDriverTest Fixings
- Changing test behaviour
2018-09-05 22:16:23 +02:00
Philipp
2838e4ebaf Automatic Install Tests & Doku (#5674)
* Automatic Installation Testing
- New dev-library "mikey179/vfsStream"
- created "reload" method for App-Reloads
- ConsoleTest now using virtual directory
- Adding Automatic Installation Tests
- Fixing some probable install-failures

* Updating README for Automatic Installation

* Updating README for Automatic Installation

* Bugfix normal installation

* Fixing copying of config files
2018-08-27 00:15:55 -04:00
Philipp
4eaeea7889 Config Console Tests (#5621)
* Config Console Tests
- `MultiUseConsole` is now a testable console
- `ConsoleTest` is a abstract TestClass for console tests
- `ConfigConsoleTest` tests the config console commands

* disable preserve global state because of smarty

* fixed requires & basepath für Console Test
2018-08-17 19:41:46 +00:00
Philipp
c5cbf565d9 DBStructure enhancements (#5437)
* Adding DBStructure enhancements

- Added DBStructure::rename()
- Added DBStructure::existTable()
- Added DBStructure::existColumn()

(cherry picked from commit 4ae06ec)

* Adding `pre_update_1279` method

- Added DBStructure::rename()
- Added DBStructure::existTable()
- Added DBStructure::existColumn()

(cherry picked from commit 8496d84)

* code standards

(cherry picked from commit 551d09b)

* simplify to `empty` instead `is_null`

(cherry picked from commit ce68835)
2018-07-21 08:43:43 -04:00
Hypolite Petovan
af6dbc654f Rename Friendica\Database\dba to Friendica\Database\DBA 2018-07-20 08:19:26 -04:00
Hypolite Petovan
daa1177e3a Update use statement lists with new Friendica\Database\dba class
- Remove unused use statement
- Remove superfluous use statements (classes in the same namespace)
- Add missing use statements
2018-07-19 22:15:21 -04:00
Philipp
2d0446bd38 simplifying unittests (#5395)
* simplifying unittests

- use @requires instead class_exist
- define @small and @medium

* simplifying unittests

- removed unnecessary throwings
2018-07-18 15:04:18 -04:00
Hypolite Petovan
820afa2284 Replace global $a with BaseObject::getApp() 2018-07-16 19:38:17 -04:00
Hypolite Petovan
59c38d1b73 Move meaningful message inside Exception thrown in Cache tests 2018-07-16 19:38:16 -04:00
Hypolite Petovan
12e34cc5fb Remove direct App instantiation from tests 2018-07-16 19:38:16 -04:00
Hypolite Petovan
1f1a3930b2 Instantiate the App in test bootstrap
- Remove wrong App instantiation in Lock test
2018-07-16 19:38:15 -04:00
Philipp Holzer
e5c767d809
a new unittest for prefix 2018-07-09 22:15:11 +02:00
Philipp Holzer
8c2258dd2e
switched back to origin TestCase structure 2018-07-09 21:48:47 +02:00
Philipp Holzer
dbc38d4263
improved unittest 2018-07-09 21:40:38 +02:00
Philipp Holzer
c829e43725
moved get_guid to System::createGUID 2018-07-09 21:38:16 +02:00
Philipp Holzer
be83696f02
Redis serialize instead of json because of objects 2018-07-08 13:35:28 +02:00
Philipp Holzer
ff24d0d567
code-standards wrap operators with spaces 2018-07-07 20:51:08 +02:00
Philipp Holzer
3cde7a3e4b
Fixed & added unittests 2018-07-07 20:35:42 +02:00
Philipp Holzer
065b83d148
Fixed memcache & unittests 2018-07-07 20:07:07 +02:00
Philipp Holzer
80a4e6263f
Added Unittests for cache
fixed Lock & Cache bugs
2018-07-07 19:46:16 +02:00
Philipp Holzer
6ecaa5b15a
copy&paste error for memcached unittest 2018-07-07 18:12:17 +02:00
Philipp Holzer
1ffe0cfd81
Added Lock Unittests & Bugfixings
Added Redis Lock Unittests
Added Memcached Lock Unittests

Fixed a bug in dba
Fixed a bug in RedisLock
2018-07-07 16:15:03 +02:00
Philipp Holzer
e41e7d2edd
Fixings
- fixed test for semaphore
- fixed some issues
- changed namespace in Tests back to "src/"
- changed namings
2018-07-05 20:57:31 +02:00
Philipp Holzer
906bb25972
code standards / simplifications 2018-07-05 07:59:56 +02:00
Philipp Holzer
aac94d1d74
Adding multihost - locking
Adding Unit-Tests for it
2018-07-04 23:37:22 +02:00