isTerminal = $isTerminal; $mock->supportsAnsi = $supportsAnsi; $mock->width = $width; $mock->height = $height; return $mock; } /** * Create a non-terminal mock (e.g., for CI environments) */ public static function nonTerminal(): self { return self::create(isTerminal: false, supportsAnsi: false); } /** * Create a minimal terminal mock */ public static function minimal(): self { return self::create(isTerminal: true, supportsAnsi: true, width: 40, height: 10); } /** * Create a full-featured terminal mock */ public static function fullFeatured(): self { $mock = self::create(isTerminal: true, supportsAnsi: true, width: 120, height: 40); $mock->supportsTrueColor = true; $mock->supportsMouse = true; return $mock; } public function isTerminal(): bool { return $this->isTerminal; } public function supportsAnsi(): bool { return $this->supportsAnsi; } public function supportsColors(): bool { return $this->supportsColors; } public function supportsTrueColor(): bool { return $this->supportsTrueColor; } public function getWidth(): int { return $this->width; } public function getHeight(): int { return $this->height; } public function supportsMouse(): bool { return $this->supportsMouse; } public function getTermType(): string { return $this->termType; } public function setWidth(int $width): self { $this->width = $width; return $this; } public function setHeight(int $height): self { $this->height = $height; return $this; } public function setTermType(string $termType): self { $this->termType = $termType; return $this; } public function setSupportsMouse(bool $supports): self { $this->supportsMouse = $supports; return $this; } public function setSupportsTrueColor(bool $supports): self { $this->supportsTrueColor = $supports; return $this; } }