Skip to content

Instantly share code, notes, and snippets.

View dazz's full-sized avatar

Anne-Julia Seitz dazz

View GitHub Profile

Mocking vs. Fakes

Why Mocks Are Slowly Destroying Your Test Suite – And How Fakes Save It


TL;DR

Mocks test implementation details. Fakes test behavior.

In hexagonal architecture, ports are promises, adapters are implementations. Mocks break this promise. Fakes keep it.

@dazz
dazz / ConfigValueType.php
Last active April 11, 2026 20:50
Shared Configuration
<?php
declare(strict_types=1);
namespace App\Shared\Configuration;
/**
* Enum for configuration value types used in type assertions.
*/
enum ConfigValueType: string

Claude Code Features — Speaker Notes & Hintergrundwissen

Dieses Dokument begleitet die Präsentation "Claude Code Features — Agentic Coding SKILLS". Es enthält pro Slide ausführliche Speaker Notes, Hintergrundwissen und Talking Points, damit du auch bei Nachfragen sicher bist.


Slide 1 — Titelfolie

@dazz
dazz / Makefile
Created September 29, 2025 07:26
Git release tag
# Configuration
RELEASE_BRANCH ?= main
CALVER_PATTERN ?= %Y.%m.%d
.PHONY: release release-auto release-next-tag release-check
# Interactive release (prompts for pull and confirmation)
release:
@RELEASE_BRANCH=$(RELEASE_BRANCH) CALVER_PATTERN=$(CALVER_PATTERN) ./scripts/release.sh release
@dazz
dazz / RouteLoader.php
Last active August 18, 2024 18:04
Dynamic route loading in a non-standard Symfony directory structure
<?php
declare(strict_types=1);
namespace App\Shared\Application\Routing;
use ReflectionClass;
use Symfony\Bundle\FrameworkBundle\Routing\RouteLoaderInterface;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Routing\Attribute\Route as RouteAttribute;
@dazz
dazz / cd.yml
Last active December 1, 2022 22:57
medium_github-actions-push-ghcr
name: Continuous Delivery
on:
push:
branches:
- 'main'
tags:
- 'v*.*.*'
jobs:
build:
{
"title": "c-ephalogram",
"blocks": {
"temp/nerd": {
"type": "text",
"name": "thermometer",
"topic": "core/nerd/temp",
"initialValue": 23.42,
"unit": "celsius",
"description": "Temperature in Nerdarea",
@dazz
dazz / addlicense.sh
Created January 22, 2014 11:43
add license header to all files
#!/bin/bash
find . -name '*.php' -type f | while read files
do
sedtest=$(sed -n '/^/,/$/p' "${files}" | sed -n '/<?php/p')
if [ "${sedtest}" ]
then
echo ${files}
@dazz
dazz / composer_hhvm_phpunit.history
Last active December 28, 2015 06:48
Running phpunit on composer with hhvm
(~/code) % hhvm --version HipHop VM v2.2.0 (rel)
Compiler: heads/HPHP-2.2-0-g633422a8386feb6cce6aa533a12d24d5c32b526c
Repo schema: 63eda7c0b41603cdee7081a57d6f45d691ad206e
(~/code) % hhvm --repo-schema 63eda7c0b41603cdee7081a57d6f45d691ad206e
(~/code/composer) % git clone https://github.com/composer/composer.git Cloning into 'composer'...
remote: Counting objects: 27010, done.
remote: Compressing objects: 100% (15944/15944), done.
remote: Total 27010 (delta 13980), reused 22055 (delta 9153)
Receiving objects: 100% (27010/27010), 5.96 MiB | 674 KiB/s, done.
Resolving deltas: 100% (13980/13980), done.
var_dump(json_encode(
array()
));
// [ ]
var_dump(json_encode(
array('foo')
));
// ["foo"]