Created
February 3, 2016 22:31
-
-
Save lucasmichot/060ba21c4898ae9e0f1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Humbug running test suite to generate logs and code coverage data... | |
Humbug has completed the initial test run successfully. | |
Tests: 135 Line Coverage: 66.27% | |
Humbug is analysing source files... | |
Mutation Testing is commencing on 57 files... | |
(.: killed, M: escaped, S: uncovered, E: fatal error, T: timed out) | |
..M.....S.S.MM........SSS.MM...M.M...M..SS.M..MM..MS.S...... | 60 (33/57) | |
.M................S..SSSS.......M...............MSMSSSSSSS.. | 120 (50/57) | |
....M...M.M....M.. | |
138 mutations were generated: | |
96 mutants were killed | |
22 mutants were not covered by tests | |
20 covered mutants were not detected | |
0 fatal errors were encountered | |
0 time outs were encountered | |
Metrics: | |
Mutation Score Indicator (MSI): 70% | |
Mutation Code Coverage: 84% | |
Covered Code MSI: 83% | |
Remember that some mutants will inevitably be harmless (i.e. false positives). | |
Time: 1.53 minutes Memory: 6.00MB | |
Humbug results are being logged as JSON to: build/humbug/humbuglog.json | |
Humbug results are being logged as TEXT to: build/humbug/humbuglog.txt | |
------ | |
Escapes | |
------ | |
1) \Humbug\Mutator\Boolean\TrueValue | |
Diff on \Tymon\JWTAuth\Blacklist::addForever() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Blacklist.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return true; | |
+ return false; | |
} | |
/** | |
* Determine whether the token has been blacklisted. | |
* | |
* @param \Tymon\JWTAuth\Payload $payload | |
2) \Humbug\Mutator\ReturnValue\This | |
Diff on \Tymon\JWTAuth\Claims\Claim::setValue() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Claims/Claim.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return $this; | |
+ return null; | |
} | |
/** | |
* Get the claim value. | |
* | |
* @return mixed | |
3) \Humbug\Mutator\ReturnValue\This | |
Diff on \Tymon\JWTAuth\Claims\Claim::setName() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Claims/Claim.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return $this; | |
+ return null; | |
} | |
/** | |
* Get the claim name. | |
* | |
* @return string | |
4) \Humbug\Mutator\ReturnValue\This | |
Diff on \Tymon\JWTAuth\Factory::addClaims() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Factory.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return $this; | |
+ return null; | |
} | |
/** | |
* Add a claim to the Payload. | |
* | |
* @param string $name | |
5) \Humbug\Mutator\ReturnValue\This | |
Diff on \Tymon\JWTAuth\Factory::addClaim() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Factory.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return $this; | |
+ return null; | |
} | |
/** | |
* Build the default claims. | |
* | |
* @return $this | |
6) \Humbug\Mutator\ReturnValue\FunctionCall | |
Diff on \Tymon\JWTAuth\Factory::jti() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Factory.php: | |
--- Original | |
+++ New | |
@@ @@ | |
{ | |
- return md5(sprintf('%s.%s', $this->claims->toJson(), Str::quickRandom())); | |
+ md5(sprintf('%s.%s', $this->claims->toJson(), Str::quickRandom())); return null; | |
} | |
/** | |
* Set the token ttl (in minutes). | |
* | |
* @param int $ttl | |
7) \Humbug\Mutator\ReturnValue\This | |
Diff on \Tymon\JWTAuth\Factory::setDefaultClaims() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Factory.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return $this; | |
+ return null; | |
} | |
/** | |
* Get the default claims. | |
* | |
* @return array | |
8) \Humbug\Mutator\Boolean\LogicalOr | |
Diff on \Tymon\JWTAuth\Http\AuthHeaders::parse() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Http/AuthHeaders.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- if (! $header || ! Str::startsWith(strtolower($header), $this->prefix)) { | |
+ if (! $header && ! Str::startsWith(strtolower($header), $this->prefix)) { | |
return; | |
} | |
return trim(str_ireplace($this->prefix, '', $header)); | |
} | |
9) \Humbug\Mutator\Boolean\LogicalOr | |
Diff on \Tymon\JWTAuth\Http\LumenRouteParams::parse() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Http/LumenRouteParams.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- if (! is_array($route) || ! Arr::has($route, '2.'.$this->key)) { | |
+ if (! is_array($route) && ! Arr::has($route, '2.'.$this->key)) { | |
// Route is not the expected kind of array, or does not have a parameter | |
// with the key we want. | |
return; | |
} | |
return $route[2][$this->key]; | |
10) \Humbug\Mutator\ReturnValue\This | |
Diff on \Tymon\JWTAuth\Http\Parser::setChain() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Http/Parser.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return $this; | |
+ return null; | |
} | |
/** | |
* Alias for setting the order of the chain. | |
* | |
* @param array $chain | |
11) \Humbug\Mutator\ReturnValue\This | |
Diff on \Tymon\JWTAuth\Http\Parser::setChainOrder() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Http/Parser.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return $this; | |
+ return null; | |
} | |
/** | |
* Iterate through the parsers and attempt to retrieve | |
* a value, otherwise return null. | |
* | |
12) \Humbug\Mutator\ReturnValue\This | |
Diff on \Tymon\JWTAuth\Http\Parser::setRequest() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Http/Parser.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return $this; | |
+ return null; | |
} | |
} | |
13) \Humbug\Mutator\ReturnValue\This | |
Diff on \Tymon\JWTAuth\JWT::unsetToken() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/JWT.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return $this; | |
+ return null; | |
} | |
/** | |
* Ensure that a token is available. | |
* | |
* @throws \Tymon\JWTAuth\Exceptions\JWTException | |
14) \Humbug\Mutator\ReturnValue\FunctionCall | |
Diff on \Tymon\JWTAuth\Manager::invalidate() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Manager.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return call_user_func( | |
+ call_user_func( | |
[$this->blacklist, $forceForever ? 'addForever' : 'add'], | |
$this->decode($token) | |
- ); | |
+ ); return null; | |
} | |
15) \Humbug\Mutator\Boolean\FalseValue | |
Diff on \Tymon\JWTAuth\Providers\JWT\Namshi::decode() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Providers/JWT/Namshi.php: | |
--- Original | |
+++ New | |
@@ @@ | |
// let's never allow unsecure tokens | |
- $jws = $this->jws->load($token, false); | |
+ $jws = $this->jws->load($token, true); | |
} catch (Exception $e) { | |
throw new TokenInvalidException('Could not decode token: '.$e->getMessage()); | |
} | |
if (! $jws->verify($this->secret, $this->algo)) { | |
throw new TokenInvalidException('Token Signature could not be verified.'); | |
16) \Humbug\Mutator\ReturnValue\This | |
Diff on \Tymon\JWTAuth\Providers\JWT\Provider::setAlgo() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Providers/JWT/Provider.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return $this; | |
+ return null; | |
} | |
/** | |
* Get the algorithm used to sign the token. | |
* | |
* @return string | |
17) \Humbug\Mutator\Boolean\TrueValue | |
Diff on \Tymon\JWTAuth\Validators\PayloadValidator::validateStructure() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Validators/PayloadValidator.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return true; | |
+ return false; | |
} | |
/** | |
* Validate the payload timestamps. | |
* | |
* @param array $payload | |
18) \Humbug\Mutator\Boolean\TrueValue | |
Diff on \Tymon\JWTAuth\Validators\PayloadValidator::validateTimestamps() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Validators/PayloadValidator.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return true; | |
+ return false; | |
} | |
/** | |
* Check the token in the refresh flow context. | |
* | |
* @param $payload | |
19) \Humbug\Mutator\Boolean\TrueValue | |
Diff on \Tymon\JWTAuth\Validators\PayloadValidator::validateRefresh() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Validators/PayloadValidator.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return true; | |
+ return false; | |
} | |
/** | |
* Set the required claims. | |
* | |
* @param array $claims | |
20) \Humbug\Mutator\Boolean\TrueValue | |
Diff on \Tymon\JWTAuth\Validators\TokenValidator::validateStructure() in /Users/lucas/Gits/tymondesigns/jwt-auth/src/Validators/TokenValidator.php: | |
--- Original | |
+++ New | |
@@ @@ | |
- return true; | |
+ return false; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment