Esempio n. 1
0
 public function testDisablePublicAccess()
 {
     $p = new Project($this->container);
     $this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
     $this->assertTrue($p->enablePublicAccess(1));
     $this->assertTrue($p->disablePublicAccess(1));
     $project = $p->getById(1);
     $this->assertNotEmpty($project);
     $this->assertEquals(0, $project['is_public']);
     $this->assertEmpty($project['token']);
     $this->assertFalse($p->disablePublicAccess(123));
 }