コード例 #1
0
 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));
 }
コード例 #2
0
 /**
  * @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;
 }