minimal example of using [phantomjs] with [qunit]
$ phantomjs run-qunit.js file://`pwd`/test.html
'waitFor()' finished in 200ms.
Tests completed in 21 milliseconds.
5 tests of 5 passed, 0 failed.
fetch('http://localhost/my-script.js').then(response => { | |
var reader = response.body.getReader(); | |
var result = new Uint8Array(); | |
reader.read().then(function processText({ done, value }) { | |
if (done) { | |
let decoder = new TextDecoder('utf-8'); | |
return decoder.decode(result); | |
} | |
<?php | |
namespace My\Authentication\Adapter; | |
use Zend\Authentication\Adapter\AbstractAdapter; | |
use Zend\Authentication\Adapter\Exception\InvalidArgumentException; | |
use Zend\Authentication\Adapter\ValidatableAdapterInterface; | |
use Zend\Authentication\Result; | |
class AdapterChain extends AbstractAdapter | |
{ |
CREATE FUNCTION `format_filesize`(filesize INTEGER) RETURNS varchar(20) CHARSET utf8 | |
BEGIN | |
DECLARE log INT; | |
SET log = TRUNCATE(LOG(1024, filesize), 0); | |
RETURN CONCAT(ROUND(filesize / POW(1024, log), 2), ' ', | |
ELT(log + 1, 'Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB', 'BB')); | |
END |
/** | |
* @file Returns the unique identifier generated by the browser for the object. | |
* The uniqueID property of the document works as an identifier generator in Internet Explorer. | |
* Each time when the value of this uniqueID property is retrieved, the browser generates | |
* a new unique identifier and returns it. | |
* HTML elements also support the uniqueID property. The first time when the value of any of these | |
* properties is retrieved, the browser generates a new identifier for the element. | |
* @author Renaat De Muynck <renaat.demuynck@gmail.com> | |
*/ |