Skip to content

Commit

Permalink
Rename test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
enumag committed Jun 15, 2016
1 parent b7a4930 commit a321879
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 37 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -30,7 +30,7 @@
},
"autoload-dev": {
"psr-4": {
"Tests\\Integration\\": "tests/integration/src"
"Tests\\Unit\\": "tests/unit/src"
}
}
}
5 changes: 0 additions & 5 deletions tests/integration/_bootstrap.php

This file was deleted.

18 changes: 0 additions & 18 deletions tests/integration/config/config.neon

This file was deleted.

2 changes: 1 addition & 1 deletion tests/integration.suite.yml → tests/unit.suite.yml
@@ -1,6 +1,6 @@
error_level: "E_ALL"

class_name: IntegrationSuiteTester
class_name: UnitSuiteTester

modules:
enabled:
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/_bootstrap.php
@@ -0,0 +1,5 @@
<?php

define('TEMP_DIR', __DIR__.'/../_temp/unit_'.md5(time()));

mkdir(TEMP_DIR);
File renamed without changes.
@@ -1,6 +1,6 @@
<?php

namespace Tests\Integration;
namespace Tests\Unit;

use Codeception\Test\Unit;
use Symfony\Component\Validator\Constraint;
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace Tests\Integration;
namespace Tests\Unit;

use Arachne\Upload\Constraint\File;
use Codeception\Test\Unit;
Expand Down
@@ -1,24 +1,18 @@
<?php

namespace Tests\Integration;
namespace Tests\Unit;

use Arachne\Bootstrap\Configurator;
use Arachne\Upload\Type\FileType;
use Codeception\MockeryModule\Test;
use Mockery;
use Nette\Http\FileUpload;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\Forms;

class FileTypeTest extends Test
{
protected function _before()
{
$config = new Configurator();
$config->setTempDirectory(TEMP_DIR);
$config->addConfig(__DIR__.'/../config/config.neon');
$container = $config->createContainer();

$this->factory = $container->getByType(FormFactoryInterface::class);
$this->factory = Forms::createFormFactoryBuilder()->getFormFactory();
}

public function testSetData()
Expand Down
@@ -1,6 +1,6 @@
<?php

namespace Tests\Integration;
namespace Tests\Unit;

use Arachne\Upload\Constraint\File;
use Arachne\Upload\Constraint\FileValidator;
Expand Down

0 comments on commit a321879

Please sign in to comment.