container); $projectModel = new ProjectModel($this->container); $taskCreationModel = new TaskCreationModel($this->container); $this->container['dispatcher']->addSubscriber(new NotificationSubscriber($this->container)); $configModel->save(array('webhook_url' => 'http://localhost/?task-creation')); $this->container['httpClient'] ->expects($this->once()) ->method('postJson') ->with($this->stringContains('http://localhost/?task-creation&token='), $this->anything()); $this->assertEquals(1, $projectModel->create(array('name' => 'test'))); $this->assertEquals(1, $taskCreationModel->create(array('project_id' => 1, 'title' => 'test'))); } }