1, 'weight' => 1600], ['weight' => 1800] ); $this->assertEquals('PUT', $operation->getMethod()); $this->assertEquals('dinosaur', $operation->getEntity()); $this->assertEquals('dinosaur/1', $operation->getPath()); $this->assertEquals(['id' => 1, 'weight' => 1600], $operation->getCurrentData()); $this->assertEquals(['weight' => 1800], $operation->getData()); $this->assertEquals('PUT dinosaur/1', (string)$operation); } public function testGetChangeLog() { $operation = new UpdateOperation( 'Update a dinosaur', 'dinosaur', ['id' => 1, 'weight' => 1600, 'attrs' => ['vision' => 'movement-based', 'teeth' => '100']], ['weight' => 1800, 'attrs' => ['vision' => 'movement-based', 'teeth' => '99']] ); $this->assertEquals( [ '[PUT dinosaur/1]', 'weight : `1600` => `1800`', 'attrs.teeth : `100` => `99`', ], $operation->getChangeLog() ); } }