public function testPatchOnMapperWithOneChangeDoesNotUpdateOtherField() { $entity = $this->createEntityToUpdate(); $entity->setEmail('*****@*****.**'); $this->mapper->patch($entity); $this->assertEquals("UPDATE `test_table` SET `email` = '*****@*****.**' WHERE `id` = '1234'", $this->getSqlString(0)); }
public function testSetMockResultsCanMockMultipleCalls() { $firstMockResults = $this->getMockResultDataForSingleResult(); $secondMockResults = $this->getMockResultDataForMultipleResults(); $this->setMockResults($firstMockResults, $secondMockResults); $firstResult = $this->mapper->findBy([]); $secondResult = $this->mapper->findAll(); $this->assertEquals($firstMockResults, [$firstResult->getArrayCopy()]); $this->assertEquals($secondMockResults, $secondResult->getArrayCopy()); }