Skip to content

Commit

Permalink
Added SysAutotasksTest
Browse files Browse the repository at this point in the history
  • Loading branch information
MekDrop committed Nov 15, 2015
1 parent 36e206e commit 7b8d6f6
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/libraries/icms/SysAutotasksTest.php
@@ -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;
}

}

0 comments on commit 7b8d6f6

Please sign in to comment.