Commit Graph

130 Commits

Author SHA1 Message Date
Philipp Holzer cbb9a2e8b7
Fix Testing 2018-10-22 20:23:06 +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 5f9065e00a
smaller about.body 2018-10-11 22:21:05 +02:00
Philipp Holzer b099cba4b4
CurlResult Tests & RegEx fix 2018-10-11 22:18:27 +02:00
Philipp Holzer 00bf0c24b6
CurlResult Tests 2018-10-11 21:19:38 +02:00
Philipp Holzer 8cc15fd2a8
Bugfixing DatabaseTest 2018-10-10 00:20:08 +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 a2fb49a2b4
Removing debugging echo
Updating Tests
2018-10-06 19:11:00 +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
Michael d5203735eb The API test should now complete again 2018-10-02 07:38:43 +00: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
Hypolite Petovan 5f48b98505 Skip DB tests if MYSQL_* environment variables are missing 2018-08-04 16:35:31 +02:00
Roland Häder bf87ad4fcf Fixed E_NOTICE in listing worker queue and new utilities class added (#5521)
* Fixes for E_NOTICE in workqueue:
- introduced class `Friendica\Util\Arrays` which will hold static methods for
  handling arrays that cannot be done with PHP's functions, like implode() on
  multi-dimensional arrays
- rewrote old-school for() loop to foreach()

* Added intial unit test with some tests on empty delimiters and/or sinle and
multi-dim array.

* Added test for for 3-dimensional arrays, thanks to  nupplaphil's feedback.
2018-07-30 21:24:26 -04:00
Michael Vogel 2d0a749734
Merge pull request #5431 from MrPetovan/task/5410-rename-database-methods
Move DBA to src/ part 3.1: Rename DBA methods
2018-07-23 15:18:58 +02:00
Philipp cd52d0b3e9 Using getopt for CLI arguments (#5446)
* Adding Argument class to Friendica

* Adding Argument class to Friendica

* Adding Argument class to Friendica

* fixing arguments for `spawnWorker`

* Adding `use Friendica\BaseObject` to `ApiTest.php`

* Refactoring the argument-usages of Friendica

* Refactoring the argument-usages of Friendica

* removing superfluous []
2018-07-23 07:40:52 -04:00
Hypolite Petovan cdd8e4fd9d Rename DBA::get_db to DBA::getConnection
- Rename DBA::$db to DBA::$connection
2018-07-22 19:28:29 -04: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
Pierre Rudloff 6e1ed0b0d3 Fix tests (#5400)
* Avoid argc side-effects

* Fix undefined array keys in JITConfigAdapter::set()

* Avoid argv side effects in ApiTest
2018-07-18 16:30:55 -04:00
Pierre Rudloff b057906bed Fix silent exit in ApiTest::testApiMediaUploadWithMedia() (#5398) 2018-07-18 15:36:51 -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 5906c7e013 Remove api test pconfig debug 2018-07-16 19:38:17 -04:00
Hypolite Petovan 478b42e88f Fix debug 2018-07-16 19:38:16 -04:00
Hypolite Petovan 6987129a00 Add yet more pconfig debug to testApiGetUserWithCustomFrioSchema 2018-07-16 19:38:16 -04:00
Hypolite Petovan 4efcd47807 Put base test config in Yaml dataset 2018-07-16 19:38:16 -04:00
Hypolite Petovan 8fe9a46ccf Set system.hostname in test bootstrap 2018-07-16 19:38:16 -04:00
Hypolite Petovan 59c38d1b73 Move meaningful message inside Exception thrown in Cache tests 2018-07-16 19:38:16 -04:00
Hypolite Petovan 47992d06ce Restore system.url declaration in 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 fc5d8e41a4 [tests] Prevent bin/worker.php from being called during tests 2018-07-16 19:38:16 -04:00
Hypolite Petovan 66ac16e101 Fix set_baseurl() notice messages in worker during tests 2018-07-16 19:38:15 -04:00
Hypolite Petovan 32418e8660 Fix test bootstrap namespace issue 2018-07-16 19:38:15 -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
Hypolite Petovan 3433c22116 Remove .htconfig.php reference from DatabaseTest 2018-07-16 19:38:15 -04:00
Hypolite Petovan 5196ea22ff Fix Database connexion in tests 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