This file contains hidden or 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
PHPUnit 12 has removed deprecated methods like willReturnCallback() and changed how some mock behaviors are defined. Here’s how to rewrite your PHPUnit 12 test code in a compatible way: | |
⸻ | |
✅ Original snippet (pre PHPUnit 12) | |
$redis = $this->createMock(RedisClient::class); | |
$redis->expects($this->exactly(3)) | |
->method('callAsync') | |
->willReturnOnConsecutiveCalls( |
This file contains hidden or 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
{ | |
"$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json", | |
"bomFormat": "CycloneDX", | |
"specVersion": "1.5", | |
"version": 1, | |
"metadata": { | |
"timestamp": "2025-02-09T18:14:46.613Z", | |
"lifecycles": [ | |
{ | |
"phase": "build" |
This file contains hidden or 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
function setUserAgent(window, userAgent) { | |
// Works on Firefox, Chrome, Opera and IE9+ | |
if (navigator.__defineGetter__) { | |
navigator.__defineGetter__('userAgent', function () { | |
return userAgent; | |
}); | |
} else if (Object.defineProperty) { | |
Object.defineProperty(navigator, 'userAgent', { | |
get: function () { | |
return userAgent; |
This file contains hidden or 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
console.log('Loading a web page'); | |
var page = require('webpage').create(); | |
page.open('http://www.billigflieger.de/', function(status) { | |
page.render('billigflieger.png'); | |
console.log(status); | |
phantom.exit(); | |
}); |