Commit Graph

242 Commits

Author SHA1 Message Date
Luke Towers 48b97a3178 Moved MediaLibrary test to the system module 2017-10-08 23:16:18 -06:00
Harmen Janssen a2a91a38e6 Added PluginManager::unregisterAll() (#3156) 2017-10-08 12:14:17 -06:00
Samuel Georges e32e8d1390 Test new validation logic 2017-07-29 10:55:21 +10:00
Samuel Georges e9884522ea Missing forward slash 2017-07-27 14:01:27 +10:00
Samuel Georges 1db67af8e8 Merge remote-tracking branch 'remotes/origin/develop' into l55upgrade
Conflicts:
	modules/system/lang/en/lang.php
2017-07-11 10:48:54 +10:00
Samuel Georges 247151f4f8 Fixes test 2017-06-30 04:58:51 +10:00
Samuel Georges 6aa60305a0 Add test for sensitivity component partial overrides
Refs #1854
Laravel looks like it broke ->contains($model), fix test for now
2017-06-27 05:05:24 +10:00
Samuel Georges 9dd6f10d6f Refit to new class loader 2017-06-08 18:56:54 +10:00
Oscar Arzola a7d20211ae Fixed Formatting and added docblock 2017-06-02 09:51:13 -05:00
Oscar Arzola 0bd12cf0e6 Added Extensibility to ReportWidgets 2017-05-30 16:49:35 -05:00
Samuel Georges 671f23e284 Move mail pretend to after app has migrated 2017-05-16 18:50:22 +10:00
Samuel Georges f3aad33e5e Resurrect Mail::pretend
Moved upgrade guide to RN-9 http://octobercms.com/support/article/rn-9
2017-05-13 12:31:34 +10:00
Samuel Georges bc23bc8fe6 getRelatedIds -> allRelatedIds
Create a running document of breaking changes
2017-05-13 06:49:29 +10:00
Samuel Georges 5f2f913732 Fixes unit tests
Clearing the cache to allow failures
Substitute mail pretend with log mode
2017-05-12 07:20:59 +10:00
Quezler cc17b679f1 Code dusting (#2826)
Code cleaning according to PSR-2 w/ exemptions (mostly dust).
2017-04-24 21:38:19 +10:00
Panagiotis Koursaris 902f61d13c Unnecessary static call directly to phpunit 2017-04-12 17:17:06 +03:00
Samuel Georges 08e7fa4296 Adds a helper for fetching the plugin object
This is useful when you need to "boot" or "register" certain areas of the plugin itself, eg:

    $plugin = $this->getPluginObject();
    $plugin->registerSubscriptionEvents();

Calling boot() or register() may work too but not always, sometimes there can be things you don't want registered. Hence why it doesn't occur automatically.
2017-04-05 08:23:39 +10:00
Samuel Georges 26b4a64854 Fixes unit test
Throwing a guarded / mass assign exception
2017-03-22 07:47:11 +11:00
Samuel Georges ef1f8a76d8 Minor naming convention change 2017-03-22 07:33:35 +11:00
Samuel Georges b32176682f Add validation model test
Refs #2676
2017-03-22 07:31:38 +11:00
Samuel Georges 5e1feb5870 Fixes unit tests
Further to previous commit moved Cms\Classes\ViewBag to components directory
2017-03-16 07:26:57 +11:00
Samuel Georges aa0fd163fd File attachments should support creation by string
Refs https://github.com/octobercms/docs/pull/227
2017-02-28 17:16:28 +11:00
Samuel Georges 53414599ef This should be flushed as part of the service provider 2017-02-16 07:35:37 +11:00
Samuel Georges f608b1ac78 Remove query caching config
Refs https://github.com/octobercms/library/pull/253#issuecomment-279944594
2017-02-15 20:57:42 +11:00
Samuel Georges 8d1ecb01b8 Improve nullable tests
Refs https://github.com/octobercms/october/issues/2612
2017-02-02 05:15:47 +11:00
Samuel Georges 7b0531e0a0 Tests to prove double save issue fixed
Has one and morph one relations would null on a second save. This is because the relation would use an UPDATE sql query to null the value, then leverage eloquent's save() method to apply it again. Eloquent's save() method does not apply attributes that are unchanged (not dirty), resulting in the value being left as null.

Refs #1986
2016-11-22 08:07:10 +11:00
Samuel Georges e45dc9601c Add database test for import model
Refs #2446
2016-11-03 07:09:47 +11:00
Samuel Georges 359461d93e Styling fix to the welcome widget
Add unit test for constraining by pivot data
2016-10-25 07:33:24 +11:00
Samuel Georges fdcfe801a7 Write tests for #2258
Prevent nulling when model fails validation
2016-07-30 10:59:25 +10:00
Samuel Georges b606e331a0 Write tests for MorphMany models
Refs https://github.com/octobercms/library/pull/217
2016-07-16 14:44:08 +10:00
Samuel Georges 649e1cfaa7 Fixes test 2016-06-04 06:13:25 +10:00
Jérémy Gaulin e3812036da Allow usage of namespace alias in the code section a a CMS page, with
unit test. Fixes #2006
2016-05-21 16:27:15 +02:00
Samuel Georges b268f54189 Write tests for simple get/set many-to-many
Refs #908
2016-05-11 07:56:11 +10:00
Samuel Georges 518dee7730 Write MorphOne model test
Refs #1868
2016-04-05 00:03:09 +10:00
Samuel Georges 39fc16ddfc Fixes tests so they pass 2016-04-05 00:02:32 +10:00
Samuel Georges f45692ce84 (Minor) Fixes test 2016-03-25 17:34:16 +11:00
Samuel Georges 7c08b10fa2 Add cms.theme.setActiveTheme event
Bring other event names in to line with convention
Complete getConfigArray method
2016-03-23 20:11:55 +11:00
Samuel Georges 4922d6d284 Retain previous listInTheme cache functionality 2016-03-20 16:04:27 +11:00
Samuel Georges beb851bf5c Add viewBag tests, this is core functionality now 2016-03-17 19:21:41 +11:00
Samuel Georges 8e3ff0c700 Update tests with minor API changes for Halcyon implementation 2016-03-17 07:58:42 +11:00
Samuel Georges d76863a3ec Merge branch 'develop' into stable
Conflicts:
	composer.json
2016-02-27 14:55:52 +11:00
Samuel Georges 423360b2d2 Merge pull request #1631 from JoelESvensson/develop
Files in the media library can now contain two dots
2016-02-27 14:36:38 +11:00
Samuel Georges 98eb4f8239 Add support for "relation" with Tree models
- This makes the list slightly more efficient for small collections, less efficient for larger collections. If this becomes a problem in future we may need to look at a solution that grabs all the root nodes to start, then lazy loads any expanded nodes as secondary AJAX requests.
- Write tests for the Tree trait improvements
Fixes #1647
2016-02-27 11:29:07 +11:00
Mariano Custiel c94706ed05 Added the ability to create instances of components from factories to allow injection of dependencies in components
Fixed descriptions

Added missing new lines at the end of fixture components

Fixed problem with include path

Fixed code as suggested. Now everything is solved through app::make

Removed tests that are not needed anymore since last changes
2016-02-22 09:44:14 +01:00
Samuel Georges 4d113dd041 Write collision tests for sluggable
Refs #1793
Test concatenated slugs while we're here
2016-02-20 17:15:58 +11:00
Samuel Georges 23da8330e7 Test for detaching belongs to many after delete 2016-02-03 22:09:21 +11:00
Samuel Georges d00883bd8f Minor touch ups to Nullable tests 2016-01-27 08:40:23 +11:00
scottbedard 88f94a35d8 Add tests for Nullable trait 2016-01-24 21:39:46 -07:00
Samuel Georges f07bd4ba4b Write tests for morphTo simple value get/set 2016-01-25 10:15:58 +11:00
Samuel Georges a498ca49a4 Write tests for hasMany simple value get/set 2016-01-24 12:39:39 +11:00
Samuel Georges d34350a7b1 Merge branch 'develop' into stable 2016-01-16 10:20:21 +11:00
Samuel Georges 6291829bba Merge pull request #1697 from mcustiel/feature-fix-plugintestbase
Fix in PluginTestBase
2016-01-16 09:04:38 +11:00
Samuel Georges 631304abc2 Tests for model delete event cascading 2016-01-13 20:11:39 +11:00
Mariano Custiel 3fdb0bcf81 Fixed the check for already processed plugins 2016-01-08 15:49:42 +01:00
Mariano Custiel 8c608b6a98 Rolled back unneeded change. 2016-01-08 15:44:37 +01:00
Mariano Custiel 902385b4e9 Removed check that made loop to always continue. Moved dependencies refresh to be done before the tested plugin refresh. 2016-01-08 15:34:40 +01:00
Samuel Georges e5aa1d651c Prepare tests for BelongsToMany relation type 2016-01-06 18:51:31 +11:00
Samuel Georges 8f68269b27 Fixes unit test 2016-01-04 18:10:35 +11:00
Samuel Georges ae73c2c592 Remove test testListsNestedUnknownColumn
^ because different DB drivers behave differently
Minor touch ups
2016-01-04 17:54:23 +11:00
Samuel Georges ecb54ff92c Rollback #1672 2016-01-02 13:40:32 +11:00
DQ Sully a5b3b49668 Make comments more clear 2015-12-28 10:52:10 -07:00
DQ Sully 2fae5a30b9 Fix Twig Caching
When October would load a file from its changed source, Twig would not see the message until it had gone. See Cms\Classes\Loader->isFresh. This meant a template would not update unless you deleted the Twig cache, or that template's TTL expired. Fix: add another variable (freshness) that would only change after being observed, and accurately reflected if a template's source had been modified
2015-12-28 10:09:15 -07:00
Samuel Georges 971f7c5053 Fixes test class conflict
Refs https://github.com/octobercms/library/pull/151
2015-12-19 11:49:31 +11:00
Joel E. Svensson ce0bbc988e Added tests for Cms\Classes\MediaLibrary::validatePath($path) 2015-12-06 19:17:14 +01:00
Samuel Georges 73d6ff2324 Minor 2015-11-28 16:22:18 +11:00
Marcelo Jacobus 8c689d63ea Ignored composer.json. Fixed failing tests
Tests were failing because the indexes were not the same
2015-11-28 16:19:41 +11:00
Samuel Georges 471ca41d6f Merge pull request #1582 from JoelESvensson/rename-stub-file
Add .stub extension to stub file
2015-11-28 15:33:41 +11:00
Samuel Georges 4e1d2ca445 Write tests for listsNested on tree traits 2015-11-28 14:12:50 +11:00
Joel E. Svensson 52090e8a9b Added .stub extension as namespaces.php is not a valid php file 2015-11-04 20:41:53 +01:00
Jofry 012f7233f8 Fix for PluginTestCase not loading dependencies. 2015-10-23 10:55:42 +11:00
Samuel Georges 9dc683ba16 Tests for hasOne get/set simple values + deferred binding 2015-10-17 17:51:46 +11:00
Samuel Georges 84a95af93b whereComponent doesn't rely on the component object 2015-10-09 05:32:24 +11:00
Samuel Georges 3531793ca3 Add where and whereComponent to CMS objects 2015-10-08 07:28:20 +11:00
Samuel Georges 8e986c42b1 Remove some deprecated code 2015-10-03 07:31:01 +10:00
Samuel Georges 91d3d4dbde Swap FileHelper methods for new Ini parser 2015-10-03 07:30:11 +10:00
Samuel Georges 3f7aa9f9f7 Write tests for revisionable trait 2015-09-19 05:36:58 +10:00
Samuel Georges d9090b3210 Write tests for Tree traits 2015-09-19 05:32:49 +10:00
Samuel Georges bf961a9a5a Write tests for deferred binding 2015-09-16 05:53:36 +10:00
Samuel Georges 1c8d021a35 Adds the ability to remove navigation items
Included tests
Refs #1413
2015-09-12 08:45:58 +10:00
Samuel Georges cd1edcb055 Add new suite for database testing 2015-09-09 19:28:47 +10:00
Samuel Georges 50812adcaf No flush abstract classes. No treat as test either. 2015-09-09 19:28:10 +10:00
Samuel Georges 2c5f9eba6b Write tests that verify the truth of #1373 2015-08-15 13:39:44 +10:00
Samuel Georges 364809a38e Add instructions for running phpunit 2015-08-08 15:45:32 +10:00
Samuel Georges e97e6804f2 Minor 2015-08-08 15:37:08 +10:00
Samuel Georges 0c8e813029 Create plugin unit test case
^- inspired by keios/oc-plugin-testsuite package
2015-08-08 15:35:22 +10:00
Samuel Georges 5c3dd4f145 Add tests that verify the truth of #1343
Plugins should be able to call NavigationManager::addSideMenuItems() without error
2015-08-08 12:28:15 +10:00
Samuel Georges 904db06f5e Write tests that verify truth of #1272
Content files with .txt extensions should not be interpreted as HTML
2015-08-08 12:03:20 +10:00
Samuel Georges 4e99ea6435 Add tests for Import/Export models 2015-08-04 21:03:42 +10:00
Samuel Georges 3a2b94829a Fixes syntax error in "system/lv" lang, write test to prevent further breakages 2015-07-29 08:20:22 +10:00
Samuel Georges bb4c2da404 Revert change from #1315, fixes original issue, write tests 2015-07-28 18:52:12 +10:00
Samuel Georges 408c06a33f Fixes unit tests for case sensitive file systems
We should be using the class compiler here eventually
2015-07-25 12:29:57 +10:00
Samuel Georges dcdd2056e8 Manually bootstrap autoloaders 2015-07-25 12:12:07 +10:00
Samuel Georges 04248c72ed Fixes unit tests 2015-07-25 11:49:26 +10:00
Samuel Georges 4344a5a245 Forgot to declare the form widgets 2015-07-25 11:07:51 +10:00
Samuel Georges c7f54ef010 Fixes WidgetManagerTest 2015-07-25 11:05:58 +10:00
Samuel Georges a324f01678 CmsCompoundObject::hasComponent() now resolves registered codes for comparison 2015-03-07 20:28:17 +11:00
Samuel Georges 5d3b1996a7 Update functional test to factor in the new user menu 2015-03-07 14:15:28 +11:00
Samuel Georges 842252b556 Minor 2015-03-04 19:22:25 +11:00
Samuel Georges 9696375099 Fixes functional tests so they pass, add details about selenium set up 2015-03-02 17:18:53 +11:00
Samuel Georges 1a0ed50d82 Adds readme for tests 2015-03-02 16:08:09 +11:00
Samuel Georges bd2b9f2770 Rem incomplete tests 2015-03-02 16:05:26 +11:00
Samuel Georges 83b54c043c Fixes unit tests so they pass 2015-03-02 16:02:13 +11:00
Samuel Georges 7145aac457 Prepare for CDN, config rename cms.plugins|themes|uploadsDir -> cms.plugins|themes|uploadsPath
Deprecate data-trigger-type on triggerapi
Fixes ref to Util class
2015-02-17 20:58:38 +11:00
Samuel Georges f6371d532b Fixes unit tests 2015-02-10 17:45:27 +11:00
Samuel Georges 8c1d0aa7da Move plugin/theme fixtures so they are shared 2015-02-10 17:45:07 +11:00
Samuel Georges 610ea932fc Fixes #856 - Implement a linking policy, defaults to relative 2015-02-09 21:52:17 +11:00
Samuel Georges 09532b6e36 Laravel 5 test case 2015-02-09 21:51:26 +11:00
Samuel Georges f26bd1221b Minor fix to unit tests 2015-02-09 21:50:59 +11:00
Samuel Georges b1b700368f Radical reorg of some classes 2015-01-28 11:49:54 +11:00
Samuel Georges c4cef299dd Fixes #828 - php artisan october:util compile assets 2015-01-12 20:08:53 +11:00
Samuel Georges dc6098c089 Create unit tests for WidgetMaker trait 2015-01-05 13:22:40 +11:00
Samuel Georges 54ecf8d33a Minor 2015-01-05 12:37:59 +11:00
Samuel Georges 415f07eb1d Fixes various unit tests so they pass (Tested in Windows) 2015-01-05 12:37:04 +11:00
Samuel Georges 2160ddf3e5 Fixes unit test - normalize plugin paths for Win systems 2015-01-05 11:46:33 +11:00
Samuel Georges 8b45ed4178 Remove functional tests from the standard phpunit process 2015-01-05 11:30:03 +11:00
Samuel Georges 65845686c4 Fixes unit tests 2014-12-10 17:42:50 +11:00
Sam Georges 22daf299f0 Fixes #724 - Rem useless placeholders 2014-11-01 17:22:22 +11:00
Sam Georges 9f5646d273 BackendSettings -> BrandSettings
pageTitle is now translated at the end of the line
Fixed unit tests so they pass
SettingsModels are now cached
2014-10-15 19:53:44 +11:00
Sam Georges d194f34cf8 Merge branch 'develop' into customize-backend 2014-10-13 18:35:39 +11:00
Sam Georges 1c4706bbbb Fixes unit tests so they pass 2014-10-09 18:08:28 +11:00
Sam Georges 79fd2e2afe Adds colorpicker form widget, add initial form for customizing backend 2014-10-03 18:01:37 +10:00
vagrant 848376028f Add test for makeWidget() 2014-09-20 10:33:09 +00:00
Sam Georges 73feabaf18 Fixes unit tests, also rename October\Test to October\Tester to remove conflict between real plugin of that name 2014-09-20 17:59:19 +10:00
Kris Arnold c3da644617 fixed paths in unit tests. 2014-09-15 16:36:05 -05:00
Sam Georges e85cbf80c5 Fixes unit tests 2014-07-29 13:14:54 +10:00
Graham Campbell be7f36b31b Composer fixes 2014-07-28 23:55:46 +01:00
Sam Georges 15b93c7b03 Rewind DI to prevent double up bug 2014-07-19 16:09:44 +10:00
alekseybobkov 48160088f2 Merge branch 'develop' of github.com:octobercms/october into develop 2014-07-16 20:50:16 +11:00
alekseybobkov 48b596ab03 Fixed unit tests 2014-07-16 20:49:55 +11:00
Sam Georges 3c7c87b338 Fixes #254 add Laravel helper functions to Twig environment 2014-07-16 10:30:39 +10:00
Sam Georges 7ecf361eb3 Fixes validation of requested partial names VS. partial names on file system 2014-07-06 12:42:08 +10:00
Sam Georges 7802213bcc Fixes #55 - Assets are now referenced correctly as Assets instead of URLs 2014-06-26 17:29:07 +10:00
Sam Georges 4c8d365353 Account for theme definition 2014-06-17 21:54:21 +10:00
Sam Georges b8200c6fb0 Add functional tests for partials, layouts and content 2014-06-17 21:35:46 +10:00
Sam Georges 28701f9a3b Backend and frontend controllers now return a Response object and support setting the status code 2014-06-17 21:00:26 +10:00
Sam Georges 5680497dea Uncomment Auth functional tests 2014-06-17 20:21:07 +10:00
Sam Georges 4f5e167fc8 Rename 2014-06-17 20:04:34 +10:00
Sam Georges 3c5bc11ce0 Rename 2014-06-17 20:03:58 +10:00
Sam Georges a866c39ec3 Fixes #316 manually (unable to merge) 2014-06-17 19:14:44 +10:00
Sam Georges 14e277e030 Create functional tests
Move unit tests to unit folder
2014-06-17 18:54:31 +10:00
Sam Georges b0f78e66b2 Fixes unit tests 2014-06-06 22:08:33 +10:00
Sam Georges 71a5dd67ab Welcome to the world, October :-) 2014-05-14 23:24:20 +10:00