getChangeItems(); self::assertCount(3, $changes); self::assertNotContains(1, array_column($changes, 'idchange')); } public function testCoreHomeChangesShouldSortChangeListMostRecentFirst() { $json = '{"idchange":4,"plugin_name":"CoreHome","version":"4.6.0b5","title":"New feature x added","description":"Now you can do a with b like this","link_name":"For more information go here","link":"https:\/\/www.matomo.org"}'; $changesModel = new ChangesModel(); $changes = $changesModel->getChangeItems(); $r = reset($changes); unset($r['created_time']); $this->assertEquals($json, json_encode($r, true)); } public function testCoreHomeChangesShouldAllowChangeItemAddWithoutLink() { $json = '{"idchange":3,"plugin_name":"CustomAlerts","version":"4.5.0","title":"New feature y added","description":"Now you can do c with d like this","link_name":null,"link":null}'; $changesModel = new ChangesModel(); $changes = $changesModel->getChangeItems(); $r = $changes[1]; unset($r['created_time']); $this->assertEquals($json, json_encode($r, true)); } } ChangesTest::$fixture = new CreateChanges();