public function testRemove_RemovesProject() { new MongoTestEnvironment(); $project = new ProjectModel(self::$savedProjectId); $this->assertTrue($project->exists(self::$savedProjectId)); $project->remove(); $this->assertFalse($project->exists(self::$savedProjectId)); }
/** * @param string $projectId * @param Website $website * @return bool */ public static function projectExistsOnWebsite($projectId, $website) { $projectExists = false; $projectModel = new ProjectModel(); if ($projectModel->exists($projectId)) { $projectModel = ProjectModel::getById($projectId); $projectExists = $website->domain == $projectModel->siteName; } return $projectExists; }