Updated headers and dropped tests
The tests weren't complete nor were they being used so I dropped them. Since this branch is still actively being maintained as it's the PHP 5.3 compatible stuff I figured I should update the headers to have the current year and explicitly show that it's PHP 5.3+ and not just PHP 5.
This commit is contained in:
parent
8bc9d52e06
commit
c865e74ebd
44 changed files with 121 additions and 324 deletions
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2007-2013 Joshua Sherman
|
Copyright (c) 2007-2014 Joshua Sherman
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Common API Class File for PICKLES
|
* Common API Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Google Profanity Class File for PICKLES
|
* Google Profanity Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Gravatar Class File for PICKLES
|
* Gravatar Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Tinychat Class File for PICKLES
|
* Tinychat Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Browser Utility Collection
|
* Browser Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Caching System for PICKLES
|
* Caching System for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Configuration Class File for PICKLES
|
* Configuration Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Single Entry Controller
|
* Single Entry Controller
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Converter
|
* Converter
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Database Class File for PICKLES
|
* Database Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Common Database Class File for PICKLES
|
* Common Database Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* PDO Class File for PICKLES
|
* PDO Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* MySQL Class File for PICKLES
|
* MySQL Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* PostgreSQL Class File for PICKLES
|
* PostgreSQL Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* SQLite Class File for PICKLES
|
* SQLite Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Date Utility Collection
|
* Date Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Common Display Class File for PICKLES
|
* Common Display Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* JSON Display Class File for PICKLES
|
* JSON Display Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* PHP Display Class File for PICKLES
|
* PHP Display Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* RSS Display Class File for PICKLES
|
* RSS Display Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* XML Display Class File for PICKLES
|
* XML Display Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Distance
|
* Distance
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Dynamic Content Class File for PICKLES
|
* Dynamic Content Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Error Reporting for PICKLES
|
* Error Reporting for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* File Utility Collection
|
* File Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Form Class File for PICKLES
|
* Form Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* HTML Class File for PICKLES
|
* HTML Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Logging System for PICKLES
|
* Logging System for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Model Parent Class for PICKLES
|
* Model Parent Class for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Module Class File for PICKLES
|
* Module Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Number Utility Collection
|
* Number Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Object Class File for PICKLES
|
* Object Class File for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Profiler
|
* Profiler
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Security System for PICKLES
|
* Security System for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Session Handling for PICKLES
|
* Session Handling for PICKLES
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Sorting Utility Collection
|
* Sorting Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* String Utility Collection
|
* String Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Time Utility Collection
|
* Time Utility Collection
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
/**
|
/**
|
||||||
* Validator
|
* Validator
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -8,13 +8,13 @@
|
||||||
* base is established as well as the path that Smarty will use to store
|
* base is established as well as the path that Smarty will use to store
|
||||||
* the compiled pages.
|
* the compiled pages.
|
||||||
*
|
*
|
||||||
* PHP version 5
|
* PHP version 5.3+
|
||||||
*
|
*
|
||||||
* Licensed under The MIT License
|
* Licensed under The MIT License
|
||||||
* Redistribution of these files must retain the above copyright notice.
|
* Redistribution of these files must retain the above copyright notice.
|
||||||
*
|
*
|
||||||
* @author Joshua Sherman <pickles@joshtronic.com>
|
* @author Joshua Sherman <josh@gravityblvd.com>
|
||||||
* @copyright Copyright 2007-2013, Joshua Sherman
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
||||||
* @license http://www.opensource.org/licenses/mit-license.html
|
* @license http://www.opensource.org/licenses/mit-license.html
|
||||||
* @package PICKLES
|
* @package PICKLES
|
||||||
* @link https://github.com/joshtronic/pickles
|
* @link https://github.com/joshtronic/pickles
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once 'classes/Convert.php';
|
|
||||||
define('JSON_AVAILABLE', true);
|
|
||||||
|
|
||||||
class ConvertTest extends PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @dataProvider providerToJSON
|
|
||||||
*/
|
|
||||||
public function testToJSON($a, $b)
|
|
||||||
{
|
|
||||||
$this->assertEquals(Convert::toJSON($a), $b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerToJSON()
|
|
||||||
{
|
|
||||||
$object = (object)'object';
|
|
||||||
$object->foo = 'foo';
|
|
||||||
$object->bar = 'bar';
|
|
||||||
|
|
||||||
return array(
|
|
||||||
array('', '""'),
|
|
||||||
array('foo', '"foo"'),
|
|
||||||
array(array('bar'), '["bar"]'),
|
|
||||||
array(array('foo', 'bar'), '["foo","bar"]'),
|
|
||||||
array(19810223, '19810223'),
|
|
||||||
array(array(1981, 02, 23), '[1981,2,23]'),
|
|
||||||
array(array('foo', 1981), '["foo",1981]'),
|
|
||||||
array(array('foo', array('bar')), '["foo",["bar"]]'),
|
|
||||||
array($object, '{"scalar":"object","foo":"foo","bar":"bar"}'),
|
|
||||||
array(true, 'true'),
|
|
||||||
array(false, 'false'),
|
|
||||||
array(null, 'null'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider providerArrayToXML
|
|
||||||
*/
|
|
||||||
public function testArrayToXML($a, $b, $c)
|
|
||||||
{
|
|
||||||
$this->assertEquals(Convert::arrayToXML($a, $b), $c);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerArrayToXML()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array('foo', false, ''),
|
|
||||||
array(array('foo', 'bar'), false, '<0>foo</0><1>bar</1>'),
|
|
||||||
array(array('foo', 'bar'), true, "<0>foo</0>\n<1>bar</1>\n"),
|
|
||||||
array(array('foo' => 'bar'), false, '<foo>bar</foo>'),
|
|
||||||
array(array('children' => array('child' => array('foo', 'bar'))), false, '<children><child>foo</child><child>bar</child></children>'),
|
|
||||||
array(array('children' => array('child' => array('foo', 'bar'))), true, "<children>\n\t<child>foo</child>\n\t<child>bar</child>\n</children>\n"),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
|
@ -1,32 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once 'classes/Date.php';
|
|
||||||
|
|
||||||
class DateTest extends PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @dataProvider providerAge
|
|
||||||
*/
|
|
||||||
public function testAge($a, $b)
|
|
||||||
{
|
|
||||||
$this->assertEquals(Date::age($a), $b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerAge()
|
|
||||||
{
|
|
||||||
ini_set('date.timezone', 'America/New_York');
|
|
||||||
|
|
||||||
$time = strtotime('-25 years');
|
|
||||||
|
|
||||||
return array(
|
|
||||||
array(date('Y-m-d', $time), '25'),
|
|
||||||
array(date('m/d/Y', $time), '25'),
|
|
||||||
array(date('r', $time), '25'),
|
|
||||||
array('today', '0'),
|
|
||||||
array('400 days ago', '1'),
|
|
||||||
array(true, Date::age('1969-12-31')),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
|
@ -1,112 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
require_once 'classes/String.php';
|
|
||||||
|
|
||||||
class StringTest extends PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @dataProvider providerFormatPhoneNumber
|
|
||||||
*/
|
|
||||||
public function testFormatPhoneNumber($a, $b)
|
|
||||||
{
|
|
||||||
$this->assertEquals(String::formatPhoneNumber($a), $b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerFormatPhoneNumber()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array('1234567890', '123-456-7890'),
|
|
||||||
array('123 456 7890', '123-456-7890'),
|
|
||||||
array('123.456.7890', '123-456-7890'),
|
|
||||||
array('123_456_7890', '123-456-7890'),
|
|
||||||
array('1234567890', '123-456-7890'),
|
|
||||||
array('1234-56-7890', '123-456-7890'),
|
|
||||||
array('(123) 456-7890', '123-456-7890'),
|
|
||||||
array('1234567890 x1000', '123-456-7890x1000'),
|
|
||||||
array('(123) 456-7890_x10.00', '123-456-7890x1000'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider providerGenerateGravatarHash
|
|
||||||
*/
|
|
||||||
public function testGenerateGravatarHash($a, $b)
|
|
||||||
{
|
|
||||||
$this->assertEquals(String::generateGravatarHash($a), $b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerGenerateGravatarHash()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array('foo@bar.com', 'f3ada405ce890b6f8204094deb12d8a8'),
|
|
||||||
array('FOO@BAR.COM', 'f3ada405ce890b6f8204094deb12d8a8'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testIsEmpty()
|
|
||||||
{
|
|
||||||
$this->assertTrue(String::isEmpty(''));
|
|
||||||
$this->assertTrue(String::isEmpty(' '));
|
|
||||||
$this->assertTrue(String::isEmpty(false));
|
|
||||||
$this->assertTrue(String::isEmpty(null));
|
|
||||||
$this->assertTrue(String::isEmpty(true, false));
|
|
||||||
|
|
||||||
$this->assertFalse(String::isEmpty(0));
|
|
||||||
$this->assertFalse(String::isEmpty('foo'));
|
|
||||||
$this->assertFalse(String::isEmpty(' bar '));
|
|
||||||
$this->assertFalse(String::isEmpty(true));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testRandom()
|
|
||||||
{
|
|
||||||
$this->assertEquals(strlen(String::random()), 8);
|
|
||||||
$this->assertEquals(strlen(String::random(16)), 16);
|
|
||||||
|
|
||||||
$this->assertEquals(preg_match('/[A-Z0-9]/', String::random(32, true, true)), 1);
|
|
||||||
$this->assertEquals(preg_match('/[A-Z]/', String::random(32, true, false)), 1);
|
|
||||||
$this->assertEquals(preg_match('/[0-9]/', String::random(32, false, true)), 1);
|
|
||||||
|
|
||||||
$this->assertEquals(preg_match('/[0-9]/', String::random(32, true, false)), 0);
|
|
||||||
$this->assertEquals(preg_match('/[A-Z]/', String::random(32, false, true)), 0);
|
|
||||||
$this->assertEquals(preg_match('/[A-Z0-9]/', String::random(32, false, false)), 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider providerTruncate
|
|
||||||
*/
|
|
||||||
public function testTruncate($a, $b, $c, $d)
|
|
||||||
{
|
|
||||||
$this->assertEquals(String::truncate($a, $b, $c), $d);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerTruncate()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array('foo bar', 3, true, '<span title="foo bar" style="cursor:help">foo...</span>'),
|
|
||||||
array('foo bar', 3, false, 'foo...'),
|
|
||||||
array('foo bar', 7, true, 'foo bar'),
|
|
||||||
array('foo bar', 8, true, 'foo bar'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider providerUpperWords
|
|
||||||
*/
|
|
||||||
public function testUpperWords($a, $b)
|
|
||||||
{
|
|
||||||
$this->assertEquals(String::upperWords($a), $b);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function providerUpperWords()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array('foo bar', 'Foo Bar'),
|
|
||||||
array('FOO BAR', 'Foo Bar'),
|
|
||||||
array('fOO bAR', 'Foo Bar'),
|
|
||||||
array('foo@bar.com', 'foo@bar.com'),
|
|
||||||
array('FOO@BAR.COM', 'FOO@BAR.COM'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
Loading…
Add table
Add a link
Reference in a new issue