/** * @test */ public function shouldNotHaveChangesWithOnlyChangedScore() { $bundle = new Bundle('knplabs/KnpMenuBundle'); $bundle->setScore(1000); $bundle->setReadme('readme number one'); $bundle->setLastCommitAt(new \DateTime('-10 day')); $bundle->setNbFollowers(100); $bundle->setNbForks(10); $beforeChange = $bundle->getStatusHash(); $bundle->setScore(1100); $afterChange = $bundle->getStatusHash(); $this->assertEquals($beforeChange, $afterChange); }
/** * @param null|Bundle $bundle */ public function setBundle(Bundle $bundle = null) { $this->bundle = $bundle; $this->hash = $bundle->getStatusHash(); }