/** * @test */ public function errorTest() { $str = __FUNCTION__; $logger = $this->logger->error($str); $this->expectOutputRegex("/\\[ERROR\\]: {$str}/"); $this->assertTrue($logger === $this->logger); }