- Changes double quotes to single quotes.
- Documents and tests array-based string replace.
- Rewrites test case.
Rewrites the test case because the tests didn't work as well as
they should be. The test file copied itself to the tmp directory,
did some string replace stuff on it and then loaded the data to
test its contents. However in those contents were also the
expectations, so assertContains() would always see the string in
the file... even if the replacing didn't work.
Closes#1665.
Added File::replace()
Searches for a given text and replaces the text if found
Renamed File::replace() to File::replaceText()
Updated the replaceText() method to utilize File Locking
Updated File::replaceText()
1. Method now checks if the lock is not identical to null
2. Since the method uses File::read() to get the contents of the file,
there is no need for a temporary file. Removed the temporary file
creation
File::replaceText() update
Opening file with r+ mode
Resolves#1764
Had to cast $models to an array since ``Hash::normalize()`` doesn't support strings which ``Set::normalize()`` does (but which is deprecated).
Reused existing tests.
Setting App.fullBaseUrl to a non-host value causes issues generating
URL's in a web context. However, not including the base path generates
incorrect URL's in a CLI context. This change allows the use of App.base
to populate the base path which is used as a fallback when there are no
requests, or when the base path is empty.
Refs #2931
In general fixed the issue where enabling SECURE_SKIP for a field
skipped "required" attribute check altogether. Instead now "required"
is set to false for hidden fields by default.
Some browsers have invalid accept headers, we should ignore the invalid
extension data as assuming it will be a qualifier can result in
incorrect results.
Fixes#4105
In some server environments notably the CLI server, _SERVER['CONTENT_TYPE'] is not available.
In these cases, fall back to the HTTP_CONTENT_TYPE header.
Refs #GH-1661