/** * @covers ::getChange */ public function testGetChange() { $object = new City(['id' => 10, 'name' => 'test1']); $this->assertNull($object->getChange('name')); $object->name = 'new val'; $expected = ['test1', 'new val']; $this->assertNull($object->getChange('id')); $this->assertEquals($expected, $object->getChange('name')); $object->name = 'test1'; $this->assertNull($object->getChange('id')); $this->assertNull($object->getChange('name')); }