J. King
9c7f4710aa
Fix feed fetching
There are almost certainly other bugs; proper tests forthcoming
7 years ago
J. King
717e74fb2e
Refactored special case for testing
7 years ago
J. King
557d17ef5d
Add rollbacks in error cases
7 years ago
J. King
a67fe30408
Fix whitespace
Also fixed my editor so tabs won't happen again!
7 years ago
J. King
b02abec250
Added test for recursive binding
Also fixed a bug uncovered by the test
7 years ago
J. King
74ae1106a4
Implement NCN API v1-2 server version reporting
- Fixes #29
- Yes, it's trivial, but now it's done!
7 years ago
J. King
9cbfa378bc
Implement NCN API v1-2 folder deleting/renaming
- Fixes #5
- Fixes #6
- Rewrote the NCNv1 dispatcher to better handle URL edge cases
7 years ago
J. King
19abce85c3
Implement NCN API v1-2 folder creation
- Fixes #4
- Tests for failure modes still required
7 years ago
J. King
842e277d43
Implemented NCN API v1-2 folder list
- Fixes #2
- Also re-organized REST handling
7 years ago
J. King
718c5a04dd
Add authz verification to folder tests
7 years ago
J. King
1e1b848c62
Remove root field from folders table
The field is no longer required with the use of recursive common table expressions, and presents a possible loss of referential integrity
7 years ago
J. King
a111bcc231
Folder get/set prop funcs and other changes
- Simplified folder removal; now properly relies on foreign keys for dependency resolution
- simplified *propertiesSet() methods by offloading input validation and query building to a generic function
- Implemented function to get the properties of a single folder (useful for internal use)
- Implemented a function to set the properties of a folder
7 years ago
J. King
2344911f78
Tests for removing folders
7 years ago
J. King
458eaac5c6
Tests for listing folders
- Fixed checking for existence of parent before listing
- Changed Result->getAll() to return an empty array rather than null for an empty result set
7 years ago
J. King
b68cea1188
Tests for adding folders
7 years ago
J. King
82e4838162
Re-organize Database tests
- Test files now consist entirely of traits:
- General setup trait mocking User class and cleaning up
- Driver trait to set up the database connection
- Series trait containing tests for the series, independent of driver used
7 years ago
J. King
dbd735f1f3
Full set of tests for user-related Database funcs
- Fixed a few inconsistencies and bugs along the way
- User manager tests need some equivalent fleshing out
7 years ago
J. King
6b2be0a877
Use Phake to create mock objects in tests
7 years ago
J. King
6bb129db2f
Mock correct method of Lang
7 years ago
J. King
f902346b6c
Eliminated passing of RuntimeData instances
- RuntimeData has now been replaced by a single static Data class
- The Data class has a load() method which fills the same role as the constructor of RuntimeData
- The static Lang class is now an instantiable class and is a member of Data
- All tests have been adjusted and pass
- The Exception tests no longer require convoluted workarounds: a simple mock for Data::$l suffices; Lang tests also use a mock to prevent loops now instead of using a workaround
7 years ago
J. King
2b8aa75ee3
Row index is not a string
7 years ago
Dustin Wilson
7236020b8b
Changed "NewsSync" to "Arsse"
7 years ago
J. King
9d5dab249c
Helper methods for testing Database class
May not actually work yet
7 years ago
J. King
8b50297e6d
Complete tests for NCN version list
- Fixes #47
- Implemented an AbstractHandler class with a generic URL parser
7 years ago
J. King
25d9158171
Fix output of NCN version list
List is supposed to be contained in a JSON object, not a bare list
7 years ago
J. King
536fa5c4fd
Implement NextCloud News version detection
- Improves #47
- Still needs wrapping to actually output to clients
7 years ago
J. King
20abd277eb
Don't muck with test file for now
7 years ago
J. King
9a8def03c2
Fill in more of the REST handler.
Not yet functional.
7 years ago
J. King
8c268581fb
Properly handle adding a folder
Also added test file for now
7 years ago
J. King
18c8076a0f
Database update tests
7 years ago
J. King
6c16ba133c
More database driver tests
7 years ago
J. King
689c1c77d0
Test for advisory locking
7 years ago
J. King
f0663e99c3
Add tests for transactions and savepoints
Existing code had subtle bugs; using increment and decrement operators actually makes things easier to understand (for once)
7 years ago
J. King
485400df2b
Rename Result->get() to Result->getRow
It should be slightly clearer what it does
7 years ago
J. King
bdf3182305
Add result->lastId method; cleanup
- Result->lastId() added as MySQL and PostgreSQL have equivalent functionality
- Adjusted tests accordingly
- Cleaned up Database class to make use of this and getAll()
7 years ago
J. King
f0adf08b1e
Add tests for type mismatches
7 years ago
J. King
95ee51563d
First battery of SQLite driver tests
7 years ago
J. King
7f7d0cd1e7
All test for constraint violation exception
7 years ago
J. King
7687109132
Reorganize Db namespace; alter User ns to match
7 years ago
J. King
37dad63dee
Impelemented Result->getAll()
- Fixes #45
- Renamed getSingle to getValue to avoid possible confusion
- Added test to ensure getValue() always returns the first datum of each row rather than going column-to-column
7 years ago
J. King
eeb1818bb5
Still more database changes
- Restructured tests
- Localized driver name for SQLite driver (fixes #37 )
- Ensured that binding type definitions are required
7 years ago
J. King
007e3747ef
Various database fixes
Authentication appears to be broken with a real database
7 years ago
J. King
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
7 years ago
J. King
1529fc367a
Partial proper tests for parameter bindings
Null and (>0) integer tested so far
Many related changes to accomodate the necessary type juggling (required for databases other than SQLite).
7 years ago
J. King
f19f683e38
Make it possible to redefine Statement type binds
7 years ago
J. King
b4d178c33f
Remove most PDO stuff
PDO will not be supported: the feature-set is less than any of the common native APIs, so why bother?
7 years ago
J. King
176247894d
Tests for Db\ResultSQLite3
7 years ago
J. King
34c69fbf92
Be explicit about the loaded locale
7 years ago
J. King
104f646973
Code comments
7 years ago
J. King
13c17f5dd4
Small fixes to authorization exception tests
7 years ago