public function testPush() { $this->container['dispatcher']->addListener(GithubWebhook::EVENT_COMMIT, array($this, 'onPush')); $p = new Project($this->container); $this->assertEquals(1, $p->create(array('name' => 'foobar'))); $tc = new TaskCreation($this->container); $this->assertEquals(1, $tc->create(array('title' => 'boo', 'project_id' => 1))); $g = new GithubWebhook($this->container); $g->setProjectId(1); $this->assertNotFalse($g->parsePayload('push', json_decode(file_get_contents(__DIR__ . '/../fixtures/github_push.json'), true))); }