public function testDelete() { $model = new DataModelStub(); $dw = XenForo_DataWriter::$mock = m::mock('Robbo\\SupportDataWriter'); $dw->shouldReceive('setExistingData')->once()->with(3); $dw->shouldReceive('delete')->once()->andReturn(true); $this->assertEquals(true, $model->delete(3)); }