Skip to content

Instantly share code, notes, and snippets.

danny@LAPTOP-QMKSA48E:/c/Users/truon/laravel/onyx-admin$ vendor/bin/phpunit --filter can_create_model
PHPUnit 8.4.2 by Sebastian Bergmann and contributors.
EEE 3 / 3 (100%)
Time: 611 ms, Memory: 22.00 MB
There were 3 errors:
1) Tests\Unit\AssetTest::can_create_model
function sumItems(array) {
let sum = 0;
array.forEach((item) => {
if(Array.isArray(item)) {
sum += sumItems(item);
} else {
sum += item;
}
})
class Vampire {
constructor(name, yearConverted) {
this.name = name;
this.yearConverted = yearConverted;
this.offspring = [];
this.creator = null;
}
/** Simple tree methods **/
function sum(fromN, toN) {
if (toN === fromN) {
return fromN;
}
return toN + sum(fromN,toN-1)
}
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>