Source of file SeparatorToUcwords.php
Size: 1,241 Bytes - Last Modified: 2015-12-22T09:12:14-05:00
../src/Filter/SeparatorToUcwords.php
12345678910111213141516171819202122232425262728293031323334353637383940
Covered by 14 test(s):
- MvcLite\DispatcherTest::testDispatch with data set "good controller request"
- MvcLite\DispatcherTest::testDispatch with data set "bad controller request"
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #0
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #1
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #2
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #3
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #4
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #5
- MvcLite\RequestTest::testSetHeaders with data set "no http headers"
- MvcLite\RequestTest::testSetHeaders with data set "one http headers"
- MvcLite\RequestTest::testSetHeaders with data set "with content type"
- MvcLite\RequestTest::testGetContentType with data set "has content type text/plain"
- MvcLite\RequestTest::testGetContentType with data set "has no content type, but has accept headers"
- MvcLite\RequestTest::testGetContentType with data set "has nothing"
41
Covered by 14 test(s):
- MvcLite\DispatcherTest::testDispatch with data set "good controller request"
- MvcLite\DispatcherTest::testDispatch with data set "bad controller request"
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #0
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #1
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #2
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #3
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #4
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #5
- MvcLite\RequestTest::testSetHeaders with data set "no http headers"
- MvcLite\RequestTest::testSetHeaders with data set "one http headers"
- MvcLite\RequestTest::testSetHeaders with data set "with content type"
- MvcLite\RequestTest::testGetContentType with data set "has content type text/plain"
- MvcLite\RequestTest::testGetContentType with data set "has no content type, but has accept headers"
- MvcLite\RequestTest::testGetContentType with data set "has nothing"
4243444546474849505152
Covered by 7 test(s):
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #0
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #1
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #2
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #3
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #4
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #5
- MvcLite\RequestTest::testGetContentType with data set "has no content type, but has accept headers"
53
Covered by 7 test(s):
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #0
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #1
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #2
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #3
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #4
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #5
- MvcLite\RequestTest::testGetContentType with data set "has no content type, but has accept headers"
54
Covered by 7 test(s):
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #0
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #1
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #2
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #3
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #4
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #5
- MvcLite\RequestTest::testGetContentType with data set "has no content type, but has accept headers"
55
Covered by 7 test(s):
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #0
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #1
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #2
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #3
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #4
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #5
- MvcLite\RequestTest::testGetContentType with data set "has no content type, but has accept headers"
56
Covered by 7 test(s):
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #0
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #1
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #2
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #3
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #4
- MvcLite\FilterSeparatorToUcwordsTest::testFilter with data set #5
- MvcLite\RequestTest::testGetContentType with data set "has no content type, but has accept headers"
575859 |
namespace MvcLite\Filter;
use MvcLite\FilterAbstract as FilterAbstract;
class SeparatorToUcwords extends FilterAbstract
public function __construct($separator) $this->separator = $separator;
public function filter($word = '') $parts = explode($this->separator, $word); $string = implode(' ', $parts); $string = ucwords($string); $parts = explode(' ', $string); return implode($this->separator, $parts);
|