mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 21:41:59 +01:00
Moved php unit tests to unit_tests/php dir
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
9898b749c7
commit
0659564b32
@ -2,7 +2,11 @@
|
||||
<phpunit colors="true">
|
||||
<testsuites>
|
||||
<testsuite name="Application Test Suite">
|
||||
<directory>./tests</directory>
|
||||
<directory>./unit_tests/php</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<php>
|
||||
<env name="DIR_BASE" value="webui/" />
|
||||
<env name="TEST_FILES_DIR" value="test_files/" />
|
||||
</php>
|
||||
</phpunit>
|
||||
|
@ -2,8 +2,10 @@
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
include_once("webui/system/model.php");
|
||||
include_once("webui/model/search/search.php");
|
||||
define('DIR_BASE', $_ENV['DIR_BASE']);
|
||||
|
||||
include_once(DIR_BASE . "system/model.php");
|
||||
include_once(DIR_BASE . "model/search/search.php");
|
||||
|
||||
|
||||
final class SearchSearchTest extends TestCase {
|
@ -2,7 +2,10 @@
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
require_once dirname(dirname(__FILE__)) . '/webui/system/helper/mime.php';
|
||||
define('DIR_BASE', $_ENV['DIR_BASE']);
|
||||
define('TEST_FILES_DIR', $_ENV['TEST_FILES_DIR']);
|
||||
|
||||
require_once DIR_BASE . 'system/helper/mime.php';
|
||||
|
||||
|
||||
final class MailParserTest extends TestCase {
|
||||
@ -26,7 +29,7 @@ final class MailParserTest extends TestCase {
|
||||
* @dataProvider providerTestParseMessage
|
||||
*/
|
||||
public function test_parse_message($input, $expected_part_count, $expected_body) {
|
||||
$message = file_get_contents(dirname(dirname(__FILE__)) . "/test_files/" . $input);
|
||||
$message = file_get_contents(TEST_FILES_DIR . $input);
|
||||
Piler_Mime_Decode::ParseMessage($message, $parts);
|
||||
|
||||
$this->assertEquals(count($parts), $expected_part_count);
|
@ -7,7 +7,9 @@ define(THIS_IS_A_TEST, 'This is a test');
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
require_once dirname(dirname(__FILE__)) . '/webui/system/helper/mime.php';
|
||||
define('DIR_BASE', $_ENV['DIR_BASE']);
|
||||
|
||||
require_once DIR_BASE . 'system/helper/mime.php';
|
||||
|
||||
|
||||
final class SplitMessageTest extends TestCase {
|
Loading…
Reference in New Issue
Block a user