Commit Graph

344 Commits

Author SHA1 Message Date
Johannes Meyer cbadaa78d6 Merge branch 'master' into feature/setup-wizard-7163 2014-09-29 15:35:52 +02:00
Johannes Meyer 07d25e8bed Fix form tests 2014-09-29 12:56:36 +02:00
Johannes Meyer 0e92e333aa Make isValid* calls of configuration forms being static
This allows a more flexible usage as there is no need to access instance
formdata when validating such configuration.
2014-09-29 11:02:45 +02:00
Alexander Fuhr c8a24f72b8 Introduce getValue() in Preferences and fix the loading of values 2014-09-26 14:15:50 +02:00
Johannes Meyer 635b802a2b Add tests for hasChanged, set/getByRef and fix setByRef 2014-09-24 10:46:35 +02:00
Johannes Meyer 6f988cb94c Remove method write() from Icinga\Web\Session\SessionNamespace 2014-09-24 10:46:35 +02:00
Eric Lippmann cde3ec6bc8 Merge branch 'master' into bugfix/commands-6593
Conflicts:
	modules/monitoring/application/controllers/TimelineController.php
2014-09-23 22:54:17 -07:00
Alexander Fuhr 07a4b25560 Merge branch 'master' into bug/history-notification-time-format-6980 2014-09-23 11:38:24 +02:00
Alexander Fuhr e784aa34b6 Implement DateTimeRenderer and fix history time format
refs #6980
2014-09-23 11:36:09 +02:00
Eric Lippmann c51b05296e Merge branch 'master' into bugfix/commands-6593 2014-09-19 13:18:47 +02:00
Eric Lippmann af58732545 Introduce `User::can()' for checking whether a user has a given permission
The authentication manager already has the `hasPermission()' method but it lacks wildcard support
and uses stupid looping. Implementing this method on the user further saves a call to `User::getPermissions()'.
2014-09-18 14:37:18 +02:00
Eric Lippmann d10afa1f9b Remove the command pipe tests 2014-09-17 12:59:45 +02:00
Eric Lippmann f640874865 monitoring: Fix DateTimePicker test 2014-09-17 12:40:41 +02:00
Alexander Fuhr 0be8b97e88 Extend TranslatorTest with new tests
refs #6982
2014-09-16 16:14:07 +02:00
Eric Lippmann 8bf66425d1 Merge branch 'master' into bugfix/commands-6593 2014-09-15 09:27:56 +02:00
Thomas Gelf 3a5415f7c8 test/Web/Hook: refactor without mocks
Mocks made no sense here. Also introduced a "new" way of naming test
functions. Output now looks as follows:

s\Icinga\Web\Hook
 [x] Knows which hooks are registered
 [x] Correctly handles multiple instances
 [x] Returns null for invalid hooks
 [x] Returns null for failing hook
 [x] Checks whether created instances inherit base classes
 [x] Throws errors for instances not inheriting base classes
 [x] Creates identical instances only once
 [x] Returns an empty array with no registered hook
2014-09-12 09:07:27 +02:00
Johannes Meyer 0693e7cf2d Fix ResourceForm tests
refs #5525
2014-09-09 13:06:30 +02:00
Johannes Meyer 40947acd16 Fix, rename and move ReorderFormTest
refs #5525
2014-09-09 12:02:51 +02:00
Johannes Meyer 7dbc83e21f Drop obsolete BaseBackendFormTest
refs #5525
2014-09-09 11:58:07 +02:00
Johannes Meyer e4fccdd150 Fix DbBackendFormTest
refs #5525
2014-09-09 10:39:49 +02:00
Johannes Meyer 31978e1236 Fix LdapBackendFormTest
refs #5525
2014-09-09 10:36:42 +02:00
Johannes Meyer cee3c32fa5 Fix dashboard tests utilizing BaseTestCase::setupIcingaMock() 2014-09-09 10:21:37 +02:00
Johannes Meyer a5c027b77c Fix UrlTest utilizing BaseTestCase::setupIcingaMock() 2014-09-09 10:21:09 +02:00
Johannes Meyer 6525d6933a Add test for Icinga\Web\Form
refs #5525
2014-09-09 09:40:49 +02:00
Alexander Fuhr ab71b1cf1c Update TranslatorTest: adjust systemwide locales order 2014-09-05 10:53:56 +02:00
Alexander Fuhr ba623d0544 SearchDashboard: adjust SearchDashboardTest and rename searchQuery to searchString 2014-09-04 22:54:41 +02:00
Thomas Gelf 0f7f2f2d8b SearchDashboard: rename ::load() to ::search()
Function signature didn't match parent factory function

fixes #7081
2014-09-04 19:35:31 +02:00
Thomas Gelf dd943c3aa7 Web\UrlTest: test the new matches() function
refs #6992
2014-09-04 18:59:22 +02:00
Thomas Gelf 97cfeaa3df SessionNamespaceTest: expect the correct exception 2014-09-04 18:39:02 +02:00
Thomas Gelf 3d170f90a5 TranslatorTest: expect the correct exception 2014-09-04 18:39:02 +02:00
Thomas Gelf 0cc024a30a DateFormatTest: disable it as it is broken 2014-09-04 18:39:02 +02:00
Thomas Gelf 5314e57b0f ResourceFormTest: disable, messed up 2014-09-04 18:39:02 +02:00
Alexander Fuhr e4d1143870 Add SearchDashboardTest 2014-09-04 18:31:08 +02:00
Thomas Gelf 4513ab2aed GraphChartTest: match current implementation
We have more nodes right now as of a graphical hack (white bg)
2014-09-04 17:57:02 +02:00
Thomas Gelf 5a29315ee8 Web\UrlTest: make tests fit current implementation
* temporarily disable [] tests
* getAbsoluteUrl uses & and not & by default
* __toString uses & and does not match getAbsoluteUrl by default
* addParams MUST hide existing ones, getValues still ships them

fixes #6604
2014-09-04 17:35:55 +02:00
Marius Hein 0935a8e340 DateFormatTest: Remove dependencies to global/user config
refs #6077
2014-09-04 16:02:10 +02:00
Alexander Fuhr 1d81211427 Move DashboardTest in correct directory
resf #6986
2014-09-03 15:13:16 +02:00
Thomas Gelf 65fb246b7e FilterTest: fix complex filter example
The filter in the test was not a valid filter.

fixes #7069
2014-09-03 15:03:24 +02:00
Alexander Fuhr acbd2bd7c0 Merge branch 'master' into feature/dashboard-component-disabled-property-6986 2014-09-03 14:40:30 +02:00
Alexander Fuhr 7cfc051228 Add tests for Dashboard and fix doc blocks
refs #6986
2014-09-03 14:36:04 +02:00
Johannes Meyer 3f9cb00b1f Fix DbBackendFormTest not creating a valid ResourceFactory mock object
refs #7063
2014-09-03 10:00:41 +02:00
Johannes Meyer 8e5deb8029 Fix TranslatorTest not expecting the default locale as being "available"
refs #7063
2014-09-03 10:00:04 +02:00
Marius Hein ee6145a173 Ldap/Query: Remove __toString()
This is needed because of exception handling. Exceptions can now bubble
up for default handling. Method render() was renamed to create() because
the method create a query. Adjust the test for method create().

refs #5536
2014-09-02 10:17:01 +02:00
Marius Hein 4e83bb098a LdapBackendFormTest: Fix mock
refs #5514
2014-08-28 12:14:55 +02:00
Marius Hein 22e17e9901 ResourceFactory: Move available function to platform
refs #5514
2014-08-28 12:14:54 +02:00
Alexander Klimov 7ff51caed0 Remove leading backslashes from the targets of use statements
- use \Exception;
+ use Exception;
2014-08-27 15:51:49 +02:00
Eric Lippmann 1dea19504f Revert "Remove leading backslashes from the targets of use statements"
This reverts commit 87a5967501.

At least 'modules/doc/run.php' issues a warning about "The use statement with non-compound name 'Zend_Controller_Router_Route' has no effect"
2014-08-27 12:24:11 +02:00
Alexander Klimov 87a5967501 Remove leading backslashes from the targets of use statements
- use \Exception;
+ use Exception;
2014-08-27 11:16:44 +02:00
Marius Hein 5abf41edef Hook/ConfigurationTab: Remove deprecated implementation
ConfigurationTab hook is not used anywhere. Test is
removed also.
2014-08-27 10:29:04 +02:00
Matthias Jentsch 1aa95b054c Add unit tests for nested-key handling in the PreservingIniWriter
fixes #6381
2014-08-26 18:31:19 +02:00