mirror of
https://github.com/e107inc/e107.git
synced 2025-08-09 08:06:38 +02:00
Issue #5444 Plugin's can now contain Unit and Acceptance tests.
This commit is contained in:
47
e107_plugins/_blank/tests/unit/_blank_eventTest.php
Normal file
47
e107_plugins/_blank/tests/unit/_blank_eventTest.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit\_blank;
|
||||
use Codeception\Test\Unit;
|
||||
|
||||
/* To use, run these commands from the root directory of e107 in CLI:
|
||||
|
||||
cd e107_tests
|
||||
vendor/bin/codecept run unit ../e107_plugins/_blank/tests/unit
|
||||
|
||||
OR with debug options:
|
||||
|
||||
vendor/bin/codecept run unit ../e107_plugins/_blank/tests/unit --steps --debug
|
||||
*/
|
||||
|
||||
|
||||
class _blank_eventTest extends Unit
|
||||
{
|
||||
|
||||
/** @var _blank_event */
|
||||
protected $ep;
|
||||
|
||||
public function testMyfunction()
|
||||
{
|
||||
|
||||
$value = "THIS IS THE BLANK TEST";
|
||||
self::assertSame($value, "THIS IS THE BLANK TEST");
|
||||
}
|
||||
|
||||
protected function _before()
|
||||
{
|
||||
require_once(dirname(__FILE__) . '/../../e_event.php');
|
||||
|
||||
try
|
||||
{
|
||||
$this->ep = $this->make('_blank_event');
|
||||
}
|
||||
|
||||
catch(Exception $e)
|
||||
{
|
||||
self::fail($e->getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user