Ran
|
Jobs
3
|
Files
152
|
Run time
8min
|
Badge
README BADGES
|
push
travis-ci
Deal with JS/PHP differences wrt encoding/decoding of numerical keys * JS always uses strings for keys, even for numerical keys. * PHP always uses integers for numerical keys, even if started out as a string. * See REPL output below. [subbu@earth:~/work/wmf/parsoid/src/Html2Wt] node > Object.keys(JSON.parse(JSON.stringify({1: 5, "2": 5}))) [ '1', '2' ] > [subbu@earth:~/work/wmf/parsoid/src/Html2Wt] psysh >>> array_keys(json_decode(json_encode([1 => 5, "2" => 5]), true)); => [ 1, 2, ] * So, unlike JS code, remove the (string) cast from the comparison of keys in the PHP code since it will fail strict checks. * Some other minor cleanup. We rely on data-parsoid info that Parsoid generates in a number of places in the codebase and don't always try to be conservative about bad data-parsoid input. If we want to be robust in the presence of corrupt data-parsoid objects, we need to do a code audit and/or throw a bunch of randomly generated input at Parsoid and fix code. Change-Id: I876da8ce1
9528 of 12002 branches covered (79.39%)
14904 of 17619 relevant lines covered (84.59%)
90406.8 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 2673.1 | 152 |
84.59 |
Travis Job 2673.1 | |
2 | 2673.2 | 152 |
84.59 |
Travis Job 2673.2 | |
3 | 2673.3 | 152 |
84.62 |
Travis Job 2673.3 |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|