Commit graph

458 commits

Author SHA1 Message Date
Joshua Sherman
57a5b0c2c0 More tests. 2014-01-17 01:53:27 -05:00
Joshua Sherman
9dadc1c821 Removed finally keyword, bringing back 5.4 2014-01-16 17:45:42 -05:00
Joshua Sherman
51467a60f7 Working on tests for the Model class
Fixed some bugs, got MySQL setup for Travis.
2014-01-16 17:06:31 -05:00
Joshua Sherman
200988eecf Swapped all array() for the shorthand []
Also finished up coverage on the Cache class.
2014-01-15 14:09:54 -05:00
Joshua Sherman
aecdd0981f Finished tests for Config class 2014-01-15 13:46:17 -05:00
Joshua Sherman
f9f179b45d Profiler tests and some rework
Abandoned private constructor and cleaned up the code a bit.
2014-01-15 00:40:34 -05:00
Joshua Sherman
46b77fa1b1 Added sanity check to resolve missing variable
Unsure why but as of this morning (perhaps because of upgrading to PHP 5.5.8
PHPUnit started barking about _SERVER['HTTP_HOST'] not being set.
2014-01-14 11:34:51 -05:00
Joshua Sherman
6257f89b18 Added most of the Cache tests
Dropped some unnecessary try/catch blocks and updated the Database class to
not use any data sources that lack a driver.
2014-01-14 02:19:40 -05:00
Joshua Sherman
35d03eb719 Finished up session class rework and testing 2014-01-13 01:39:14 -05:00
Joshua Sherman
f1ecc27029 Ripped out the MySQL session handling
Write heavy operations like sessions fare much better in Redis or (sic)
Memcache[d] so I've dropped support for MySQL sessions entirely.
2014-01-13 01:06:07 -05:00
Joshua Sherman
097911a667 Added validation class testing and fixed some bugs
Amazing that there were as many bugs in there as there were.
2014-01-13 00:24:17 -05:00
Joshua Sherman
9a2d593eff Reworked the database class
Got rid of all of that object bloatin’ nonsense.
2014-01-12 23:24:41 -05:00
Joshua Sherman
6120933fce More tests and cleaned up some ancient code
It actually referenced the INI file, lolno.
2014-01-12 21:53:05 -05:00
Joshua Sherman
62133dc1ca Hacking away to get coverage up
Finished up all the low hanging fruit (working the classes I already started
that were just shy of 100% coverage). Just shy of 80% coverage at this point.
2014-01-12 18:20:30 -05:00
Joshua Sherman
8db383601e More tests and 100% coverage achievements!
Also fixed a few minor bugs and reworked Browser class to not use the constant
UNIT_TESTING so I could get the class to 100% coverage. Adds a dependency of
testing_helpers which I believe is available on Travis CI by default. Up to 75%
coverage, w00t w00t!
2014-01-12 16:09:48 -05:00
Joshua Sherman
faaefc1b82 Getting coverage to 100% on these classes
Also found a bug in the Form class that would bork phone numbers with dashes in
them. Even though the Form class is going to go away eventually I wanted to fix
the issue.
2014-01-12 13:56:52 -05:00
Joshua Sherman
74611b9e74 Added test against alternate default URL 2014-01-11 19:33:34 -05:00
Joshua Sherman
36d86100f9 Fixed up a conditional, added a new Distance test. 2014-01-11 19:19:07 -05:00
Joshua Sherman
5d7f3a0e5a Added an injectable endpoint
Allows for injecting endpoints to simulate poor responses while still testing
the responses from the actual endpoint.
2014-01-11 19:07:29 -05:00
Joshua Sherman
549abca8df Expanded File class testing
Shooting for 100%!
2014-01-11 18:28:14 -05:00
Joshua Sherman
9f3ec38d1a Dropped API Common class
The class didn't provide any value and promised that it would in the future.
Any sort of redundant connection logic should simply be contained in a class
that can be extended and not an API-centric common class. Trying to move away
from all common classes in favor of classes that can be reused in different
parts of the core as well as outside of it.
2014-01-11 18:07:50 -05:00
Joshua Sherman
b3c70ecdec Last one, I swear 2014-01-11 16:30:53 -05:00
Joshua Sherman
dcee9e748a More .composers left over 2014-01-11 16:29:09 -05:00
Joshua Sherman
8fc726b983 Updated copyright date.
It's a new year, figured it would be nice to get this done before summer time
like most years.
2014-01-05 13:44:25 -05:00
Joshua Sherman
bf817d52f4 HTML class tests
Wrote tests and dropped the ol' XHTML "self-closing" tags. Also fixed a bug with closing tags when no content was present.
2014-01-04 10:15:56 -05:00
Joshua Sherman
f0b5bfa459 Form class tests and updates
Still rockin' that XHTML4 nonsense. Updates to HTML5 (sans self closing tags) and added tests.
2014-01-03 23:45:52 -05:00
Joshua Sherman
5678e75fbd Tinychat API has been dropped, dropping class. 2014-01-03 17:46:45 -05:00
Joshua Sherman
6e9736f030 Finished up tests for Dynamic class
Switched closure compiler to a composer version for ease of use when doing CI testing
2014-01-03 00:22:58 -05:00
Joshua Sherman
17752f71b3 More composer stuff, updated compile / minify logic
Now using composer installed apps for less and scss files.
2014-01-02 22:39:19 -05:00
Joshua Sherman
bfa35794b5 Cleaned up old code and wrote more tests
Log class is fully tested, Dynamic class is nearly complete but I wanted to see what Travis would bark about regarding LESS and SASS
2014-01-02 18:16:15 -05:00
Joshua Sherman
e9456600a7 Sort and Time class tests 2014-01-02 00:09:58 -05:00
Joshua Sherman
9b1feda909 Added support for custom maintenance templates. 2013-12-31 10:56:31 -05:00
Joshua Sherman
5a15c791c5 Finished up Controller tests for existing functionality 2013-12-31 10:39:21 -05:00
Joshua Sherman
ec4d771440 Expanded sanity check to hopefully pass tests
Travis is failing and barking about an undefined index "cache". Found the one place I'm referencing it without checking it first and added an isset(). Not failing locally so perhaps it's an issue with PHP 5.5.6 in comparison to 5.5.7 or some other nuance I'm not aware of.
2013-12-30 18:11:42 -05:00
Joshua Sherman
c0dbb39bda More tests
Also, found that damn newline that was being output.
2013-12-30 17:13:22 -05:00
Joshua Sherman
64dc006b5f Documented some stuff, refactoring some other stuff
Moved re-used object instances to the Object class and added object loader logic to the constructor.
2013-12-30 15:47:13 -05:00
Joshua Sherman
54471c361b So much refactoring... 2013-12-30 00:38:13 -05:00
Joshua Sherman
7f37abc527 Cleaned up test includes a bit
Probably want to include an autoloader at some point. Also added PHP 5.3 and 5.4 to the test list, 5.3 outta fail, unsure about 5.4
2013-12-29 13:16:21 -05:00
Joshua Sherman
19a211cf6a More refactoring, ditching old code
Added a new 404 system which checks for templates/__shared/404.phtml (module-less bare in mind) and falls back to a generic Apache-ish Not found page with PICKLES shout out. Added some more assumptions (login page is always /login a/k/a the login.php module) also there's no way to customize which template is used for the 404. Removed some code that was no longer used in the Security class.
2013-12-29 12:52:13 -05:00
Joshua Sherman
09d1744910 Refactoring old code
More like removing old code. Added some memento notes for myself in there.
2013-12-28 18:41:56 -05:00
Joshua Sherman
6a1056306f Dropped old Display classes
RSS isn't ported yet but I have a copy to work from
2013-12-28 16:26:12 -05:00
Joshua Sherman
064b4d9f55 Reworked Controller around new Display class 2013-12-28 16:23:42 -05:00
Joshua Sherman
4c0632cb4c Cleaned up whitespace 2013-12-28 16:23:27 -05:00
Joshua Sherman
a050c7d031 Hacked in some public variables
Very hacky, switched variables to public and added a catch in the __get method to assign to the right place for the variables that modules are using (instead of having to update all of the modules in the wild)
2013-12-28 16:22:22 -05:00
Josh Sherman
07a95a7508 Built out new Display class with tests
Not hooked up to the Controller yet, wanted to get Travis setup.
2013-12-28 01:13:02 -05:00
Josh Sherman
ae66815cb9 Hacked in pretty JSON option
Just need to include `?pretty=true` to a request and the JSON returned will be formatted. As I was digging in there I think I may consolidate all of the Display logic into a single class and potentially bring back `.json` and `.xml` extensions to dictate what is returned. Would help a ton in scenarios where I have an endpoint that I want to server up a template on error or return JSON on success.
2013-12-24 14:17:03 -05:00
Josh Sherman
9b297f3d87 Dropped Convert::toJSON()
In an effort to only maintain compatibility with the latest version of PHP (currently the 5.5 branch) I dropped the sanity checks if `json_encode` was available as it is always available in PHP 5.2+. Dropping this sanity check also allowed me to remove the wrapper function and the `JSON_AVAILABLE` constant. Ideally I'd like to move towards dropping the `Convert` class entirely but will need a way to convert an array to XML as the `RSS` class still leverages it. One thought is to move that code right into the `RSS` class as it never gets used elsewhere because XML is gross.
2013-12-24 13:28:49 -05:00
Josh Sherman
0cbc1df48f Added AreYouAHuman.com integration
Includes AYAH v1.1.7, a static wrapper class and an update to our main include file to handle loading the official AYAH library from the vendors directory.
2013-12-23 19:11:01 -05:00
Josh Sherman
d96181c60f Q4 2013, seemed like a good time to update the copyright notices 2013-11-04 17:36:04 -05:00
Josh Sherman
058e22c1aa Made method public and fixed return 2013-10-02 15:59:48 -04:00