expectException(Exception\InvariantViolationException::class); $this->expectExceptionMessage('Expected positive number for log, got -45'); Math\log(-45); } public function testNonPositiveBaseThrows(): void { $this->expectException(Exception\InvariantViolationException::class); $this->expectExceptionMessage('Expected positive base for log, got 0.0'); Math\log(4.4, 0.0); } public function testBaseOneThrowsForUndefinedLogarithm(): void { $this->expectException(Exception\InvariantViolationException::class); $this->expectExceptionMessage('Logarithm undefined for base 1'); Math\log(4.4, 1.0); } }