expectException(Exception\InvariantViolationException::class); $this->expectExceptionMessage('Expected a non-negative number.'); Math\log(-45); } public function testNonPositiveBaseThrows(): void { $this->expectException(Exception\InvariantViolationException::class); $this->expectExceptionMessage('Expected a non-negative base.'); 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); } }