Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
namespace ImpressCMS\Tests\Libraries\ICMS; | ||
|
||
class SysAutotasksTest extends \PHPUnit_Framework_TestCase { | ||
|
||
/** | ||
* Test if is available | ||
*/ | ||
public function testAvailability() { | ||
$this->assertTrue(class_exists('icms_sys_autotasks_System', true), 'icms_sys_autotasks_System does\'t exist'); | ||
$instance = $this->getClassInstance('icms_sys_autotasks_System'); | ||
$this->assertTrue($instance instanceof \icms_sys_autotasks_ISystem, 'icms_sys_autotasks_System doesn\'t implements icms_sys_autotasks_ISystem'); | ||
} | ||
|
||
/** | ||
* Gets instance of class from classname | ||
* | ||
* @param string $class ClassName | ||
* | ||
* @return object | ||
*/ | ||
private function getClassInstance($class) { | ||
$instance = $this->getMockBuilder($class) | ||
->disableOriginalConstructor() | ||
->getMock(); | ||
return $instance; | ||
} | ||
|
||
} |