expectException(InvalidArgumentException::class); Covariance::fromXYArrays([], [1, 2, 3]); } public function testThrowExceptionOnEmptyY(): void { $this->expectException(InvalidArgumentException::class); Covariance::fromXYArrays([1, 2, 3], []); } public function testThrowExceptionOnTooSmallArrayIfSample(): void { $this->expectException(InvalidArgumentException::class); Covariance::fromXYArrays([1], [2], true); } public function testThrowExceptionIfEmptyDataset(): void { $this->expectException(InvalidArgumentException::class); Covariance::fromDataset([], 0, 1); } public function testThrowExceptionOnTooSmallDatasetIfSample(): void { $this->expectException(InvalidArgumentException::class); Covariance::fromDataset([1], 0, 1); } public function testThrowExceptionWhenKIndexIsOutOfBound(): void { $this->expectException(InvalidArgumentException::class); Covariance::fromDataset([1, 2, 3], 2, 5); } public function testThrowExceptionWhenIIndexIsOutOfBound(): void { $this->expectException(InvalidArgumentException::class); Covariance::fromDataset([1, 2, 3], 5, 2); } }