Commit graph

14 commits

Author SHA1 Message Date
0c410fcf50 More binding tests and related changes
- Introduced abstract Statement class to hold common methods
- Common methods currently consist of a date formatter and type caster
- Moved binding tests to a trait for reuse with future drivers
2017-03-02 18:42:19 -05:00
000781dc36 Cover blank passwords in existing tests 2017-02-27 23:28:11 -05:00
e4852b581a Start on tests for authorization 2017-02-27 23:04:13 -05:00
a039e104cf Allow inspection of the mock internal database
This will allow testing of auto-provisioning in the internal database when using external drivers
2017-02-27 11:44:20 -05:00
798d7e7ab7 Added synthetic tests for external User drivers
Fixed two typos in external driver handling
2017-02-26 22:06:14 -05:00
b6a47fc366 Abstract synthetic User backend for later tests 2017-02-26 12:09:44 -05:00
be9ebf9ca1 Remove authz from User driver; moved to main class 2017-02-22 23:22:45 -05:00
8a0d021622 More User tests and resultant fixes 2017-02-20 19:04:08 -05:00
7785eb072b Complete rewrite of User class and other changes
- User-related database methods will now throw User\Exception upon errors
- Internal userAdd method can now generate random passwords
- Pursuant to above, dependency on password genrator has been added, and password-related methods now return strings instead of booleans
- User class methods now all explicitly follow different branches for internal/external/missing implementations
- various User class methods now perform auto-provisioning of the internal database when external implementations report success on users not in the database
- Tests have been adjusted to account for the above changes
- Lots is probably still broken
2017-02-20 17:04:13 -05:00
e6feb8de8d First basic test for User class
As the User class depends on the database and this has yet to be tested (though I'm fairly certain it works), the mock driver also acts as a mock of the required database functions, with both instances sharing a common storage structure. Later test series should separate the two.
2017-02-19 00:22:16 -05:00
574388665a Tidy up tests and User stuff
- Skeleton of mock internal driver
- Skeleton of test suite
- Re-arranged lots of code
- Made drive name localized (improves #37)
2017-02-17 19:22:50 -05:00
8db31cf3e4 Tweaked Lang; added comments and tests
Tweaks:
- get() method can now report loaded and well as wanted locale
- msg() passed without vars still gets formatted to catch malformed strings
- set('en', false) followed by set('en', true) will now immediately load
- Lang::$synched was not getting set to true properly

Tests:
- Added test for get()
- Added test for malformed strings (exception code was missing)
- Added test for missing strings
- Added test for strings taking variables not being passed any variables
2017-02-16 17:50:34 -05:00
c5fac33398 Converted all hard tabs to soft tabs 2017-02-16 14:29:42 -06:00
8e2a2c46b1 Refactor test infrastructure to use PSR-4. 2017-02-14 22:34:08 -05:00