Commit Graph

225 Commits

Author SHA1 Message Date
Ben Thomson d52893dd43
Will need to use PluginTestCase for FileModel to be supported 2020-08-14 16:10:05 +08:00
Ben Thomson 064fc1fe36
Merge branch 'develop' into wip/image-resizing 2020-08-14 15:14:48 +08:00
Ben Thomson d98526f639
Change deprecated PHPUnit calls in MediaLibrary tests 2020-08-14 10:20:03 +08:00
Ben Thomson c7ed0ffa1a
Implement improved testing procedure (#5238)
Refs: 5feb7b872f
2020-08-14 08:00:39 +08:00
Luke Towers 04de6ef0e2 Play nicer with tests 2020-08-13 03:15:53 -06:00
Luke Towers b4dd25534e Merge branch 'develop' into wip/image-resizing 2020-08-09 04:26:48 -06:00
Luke Towers 7b9408e394 More WIP, moved logic in the appropriate locations 2020-08-07 23:27:32 -06:00
Ben Thomson 50e61df10e
Fix path validation for CmsObjects & Assets (#5229)
Instead of using a temporary file to allow checks with `realpath()` to succeed, use the new `resolve_path()` helper added in a9a629b012 to replace the `realpath()` usage and allow for path resolution of files that don't exist yet.

This will allow new asset files to still be saved correctly, whilst still preventing paths outside of the assets directory to be used.

Replaces b1954e9258.
2020-08-05 12:00:22 -06:00
Ben Thomson 0dee0e54b1
Alias Illuminate\Support\Debug\HtmlDumper to Symfony's HtmlDumper 2020-07-20 10:40:50 +08:00
Ben Thomson bb3d018590
Add fallback alias for Illuminate\Support\Facades\Input
This will redirect any instances of the now-removed Input facade from Laravel to the Rain library's Input facade.
2020-07-10 15:56:11 +08:00
Ben Thomson b5dcc42ed2
Namespace the authentication in tests under 'backend.auth'
Prevents conflicts with unit tests that might use another auth system, ie. Passport.

Hat tip to @LukeTowers for pointing out my shame.
2020-07-01 10:52:55 +08:00
Luke Towers ad69711634 Merge branch 'develop' into wip/laravel-6 2020-06-11 10:38:29 -06:00
Luke Towers d64c3850ff fix tests, not required since decompileAssets() supports even invalid assets now 2020-06-05 15:59:20 -06:00
Luke Towers ec1d8fe315 Fix Media Library test for L6 2020-05-27 13:25:36 -06:00
Luke Towers 252c9b7f58 Merge branch 'develop' into wip/laravel-6 2020-05-27 12:44:54 -06:00
Dieter Holvoet 40d8bb453e
Get file and folder metadata for media items using a single network call if possible (#5046)
Co-Authored-By: Ben Thomson <ben@abweb.com.au>. Fixes #5045.
2020-05-26 03:20:41 -06:00
Ben Thomson 3241cf7d64
Fix deprecated PHPUnit calls in ControllerTest 2020-05-19 12:57:10 +08:00
Luke Towers 4b22d06c60 Merge branch 'develop' into wip/laravel-6 2020-04-04 14:11:05 -06:00
Dan Harrin 903b5b01ea
Add support for "soft" components (#4539) 2020-04-05 01:02:43 +08:00
Luke Towers 44cc5d371b Merge branch 'develop' into wip/laravel-6 2020-04-04 02:32:16 -06:00
Marc Jauvin 600fbd7cfa
Improve code readability for exists method (#5022) 2020-04-02 08:33:58 -06:00
Marc Jauvin 9aa6b9d9d1
Add more unit tests for the PluginManager (#4838) 2020-04-01 21:47:06 -06:00
Luke Towers d18f78bb3d
Minor path fix 2020-03-29 08:56:59 -06:00
Ben Thomson e51579134a
Fix PHPUnit location 2020-03-29 17:07:19 +08:00
Ben Thomson 17fd8b5d9f
Add info about RainLab Dusk for functional testing 2020-03-29 16:41:37 +08:00
Ben Thomson 64ba17ee75
Drop assertContains calls in OctoberEnv test 2020-03-29 16:20:51 +08:00
Ben Thomson 98a2fb150f
Merge remote-tracking branch 'origin/develop' into wip/laravel-6 2020-03-29 15:45:31 +08:00
Ben Thomson a92597064b
october:env command fixes
- Adds quotes around all strings inserted into config files, preventing them from being interpreted as constants.
- Changed all private methods in OctoberEnv.php to protected.
- Updated test to check some config files for expected changes.
2020-03-29 15:42:46 +08:00
Luke Towers 82238ba3a4
Fix for Laravel 6 upgrade 2020-03-27 12:20:31 -06:00
Ben Thomson ef606c76c5
Merge branch 'develop' into wip/laravel-6 2020-03-27 14:52:15 +08:00
Ben Thomson 6dbfdd7e65
Allow quotes to be correctly handled by october:env (#4986)
This fix will apply quotes around string environment variables which contain either a single, or double, quote as well as any variables with a hash symbol - escaping any double-quotes encountered. When artisan october:env is run, this should correctly transfer all configuration values from the config files to the .env file.

Fixes #4979.
2020-03-26 23:40:01 +08:00
Samuel Georges babf8f05a7 Restore autoloader and bootstrapper
There was no real need to change this from what it was
2020-02-27 20:07:42 +11:00
Samuel Georges 9d94271977 Remove selenium tests 2020-02-27 20:07:41 +11:00
Ben Thomson 5e4916148f Revert Laravel Dusk changes (#4919)
The Browser tests will be made into a RainLab plugin. (https://github.com/rainlab/dusk-plugin)
2020-02-07 16:59:39 +08:00
Ben Thomson bb7df3cb61
Tweak code block in README 2020-02-03 12:24:24 +08:00
Ben Thomson 65c3a88179
[Laravel 6] Add support for Laravel Dusk tests (#4919) 2020-02-03 12:21:04 +08:00
Ben Thomson 26944a5f68 Add simple unit tests for HasOneThrough and HasManyThrough relations 2020-01-22 18:16:36 +08:00
Ben Thomson e33032441b
Drop monkey-patch on mock objects generator.
Reverts 72f85ebc55. No longer needed with PHPUnit 8.
2020-01-21 09:03:49 +08:00
Ben Thomson 60d6825c0d Partially revert and restore bootstrap/autoload.php
As discussed with @daftspunk, we now have to hard-code some overrides to ensure our helpers are loaded first. To keep the code DRY and self-explanatory, we do need to keep the autoload.php file.
2020-01-20 15:11:38 +08:00
Ben Thomson e099b7bdee Move autoloading to index to make it the same as Laravel 6.
Implements work done in https://github.com/octobercms/october/pull/4280.

Credit to @Samuell1
2020-01-20 14:33:14 +08:00
Ben Thomson d6fc30626c
Un-mark skipped test - seems to be working 2020-01-19 22:41:43 +08:00
Ben Thomson 9be2decce3
Fix guarding for fixtures now that models aren't unguarded by seeders 2020-01-19 22:41:28 +08:00
Ben Thomson a4c34d1dea
Fix more exception tests 2020-01-19 22:26:21 +08:00
Ben Thomson 2c529cf753
Update unit tests to not rely on deprecated methods of testing 2020-01-19 17:27:38 +08:00
Ben Thomson ae63b096f7
Fix test case incompatibilities, clean up ignores 2020-01-19 16:33:06 +08:00
Ben Thomson 5d3d4ad0b2
Merge branch 'develop' into wip/laravel-5.9 2020-01-18 21:00:40 +08:00
Samuel Georges 15036fd1d9 Tell codesniffer to ignore this patched file 2019-12-09 23:03:03 +11:00
Samuel Georges 72f85ebc55 Monkey patch PHPUnit\Framework\MockObject\Generator
This avoids "Function ReflectionType::__toString() is deprecated" warnings
2019-12-09 22:56:51 +11:00
Larry Barker 2b05d01c6c Support additional file name and path characters in media manager (#4564)
* Support additional file name and path characters in media manager

When working with abstract file names that may contain additional characters, such as quotes or ampersands, the media manager would throw an error. This PR adds two additional characters to the character whitelist.

* Add unicode filename to tests
2019-12-05 19:44:04 +11:00
Ben Thomson 7e3136564f
Merge branch 'develop' into wip/laravel-5.9 2019-11-21 23:18:25 +08:00