public function testApiFormat_CallsMethodOnModel() { $formatter = $this->createFormatter(); $array = ['some']; $val = 'val'; $this->expect('format', [$array])->willReturn($val); $this->assertSame($val, $formatter->format($array)); }