Fixed PHPUnit assert calls to static.
This commit is contained in:
parent
1dc8acd263
commit
c05d3d6c90
29 changed files with 355 additions and 346 deletions
|
|
@ -7,7 +7,7 @@ use PHPCensor\Model;
|
|||
|
||||
/**
|
||||
* Unit tests for the Project model class.
|
||||
*
|
||||
*
|
||||
* @author Dan Cryer <dan@block8.co.uk>
|
||||
*/
|
||||
class ProjectTest extends \PHPUnit\Framework\TestCase
|
||||
|
|
@ -15,8 +15,8 @@ class ProjectTest extends \PHPUnit\Framework\TestCase
|
|||
public function testExecute_TestIsAValidModel()
|
||||
{
|
||||
$project = new Project();
|
||||
$this->assertTrue($project instanceof \b8\Model);
|
||||
$this->assertTrue($project instanceof Model);
|
||||
self::assertTrue($project instanceof \b8\Model);
|
||||
self::assertTrue($project instanceof Model);
|
||||
}
|
||||
|
||||
public function testExecute_TestGitDefaultBranch()
|
||||
|
|
@ -24,7 +24,7 @@ class ProjectTest extends \PHPUnit\Framework\TestCase
|
|||
$project = new Project();
|
||||
$project->setType('git');
|
||||
|
||||
$this->assertEquals('master', $project->getBranch());
|
||||
self::assertEquals('master', $project->getBranch());
|
||||
}
|
||||
|
||||
public function testExecute_TestGithubDefaultBranch()
|
||||
|
|
@ -32,7 +32,7 @@ class ProjectTest extends \PHPUnit\Framework\TestCase
|
|||
$project = new Project();
|
||||
$project->setType('github');
|
||||
|
||||
$this->assertEquals('master', $project->getBranch());
|
||||
self::assertEquals('master', $project->getBranch());
|
||||
}
|
||||
|
||||
public function testExecute_TestGitlabDefaultBranch()
|
||||
|
|
@ -40,7 +40,7 @@ class ProjectTest extends \PHPUnit\Framework\TestCase
|
|||
$project = new Project();
|
||||
$project->setType('gitlab');
|
||||
|
||||
$this->assertEquals('master', $project->getBranch());
|
||||
self::assertEquals('master', $project->getBranch());
|
||||
}
|
||||
|
||||
public function testExecute_TestBitbucketDefaultBranch()
|
||||
|
|
@ -48,7 +48,7 @@ class ProjectTest extends \PHPUnit\Framework\TestCase
|
|||
$project = new Project();
|
||||
$project->setType('bitbucket');
|
||||
|
||||
$this->assertEquals('master', $project->getBranch());
|
||||
self::assertEquals('master', $project->getBranch());
|
||||
}
|
||||
|
||||
public function testExecute_TestMercurialDefaultBranch()
|
||||
|
|
@ -56,7 +56,7 @@ class ProjectTest extends \PHPUnit\Framework\TestCase
|
|||
$project = new Project();
|
||||
$project->setType('hg');
|
||||
|
||||
$this->assertEquals('default', $project->getBranch());
|
||||
self::assertEquals('default', $project->getBranch());
|
||||
}
|
||||
|
||||
public function testExecute_TestProjectAccessInformation()
|
||||
|
|
@ -69,9 +69,9 @@ class ProjectTest extends \PHPUnit\Framework\TestCase
|
|||
$project = new Project();
|
||||
$project->setAccessInformation($info);
|
||||
|
||||
$this->assertEquals('Item One', $project->getAccessInformation('item1'));
|
||||
$this->assertEquals(2, $project->getAccessInformation('item2'));
|
||||
$this->assertNull($project->getAccessInformation('item3'));
|
||||
$this->assertEquals($info, $project->getAccessInformation());
|
||||
self::assertEquals('Item One', $project->getAccessInformation('item1'));
|
||||
self::assertEquals(2, $project->getAccessInformation('item2'));
|
||||
self::assertNull($project->getAccessInformation('item3'));
|
||||
self::assertEquals($info, $project->getAccessInformation());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue