/** * Tests the save method * * @covers JTable::save * * @return void * * @since 12.3 */ public function testSave() { $this->object = $this->getMockBuilder('TableDbTestComposite') ->setConstructorArgs(array(TestCaseDatabase::$driver)) ->setMethods(array('bind', 'check', 'store', 'checkin', 'reorder', 'setError')) ->getMock(); $this->object->expects($this->once()) ->method('bind') ->with(array('id1' => 75, 'id2' => 75, 'title' => 'My testSave Title'), '') ->will($this->returnValue(true)); $this->object->expects($this->once()) ->method('check') ->with() ->will($this->returnValue(true)); $this->object->expects($this->once()) ->method('store') ->with() ->will($this->returnValue(true)); $this->object->expects($this->never()) ->method('reorder'); $this->object->save(array('id1' => 75, 'id2' => 75, 'title' => 'My testSave Title')); }