public function testAfterSaveScheduled() { $this->indexerMock->expects($this->once())->method('isScheduled')->will($this->returnValue(true)); $this->indexerMock->expects($this->never())->method('reindexRow'); $this->prepareIndexer(); $this->subjectMock->expects($this->once())->method('getId')->will($this->returnValue(1)); $this->assertEquals($this->subjectMock, $this->model->afterSave($this->subjectMock)); }