formatter = new BooleanFormatter; } /** * testFormat * * @return void */ public function testFormat() { $formatter = $this->formatter; $boolean = $formatter->format(true); $this->assertEquals($boolean, 1); $boolean = $formatter->format(false); $this->assertEquals($boolean, 0); $this->expectException(InvalidArgumentException::class); $boolean = $formatter->format('boolean'); } }