mrtnzlml-archive / testbench

:green_apple: Simple integration testing tool for Nette applications
http://zlml.cz/jednoduche-testovani-pro-uplne-kazdeho
41 stars 13 forks source link

Zamrznutí testu #41

Closed Olicek closed 7 years ago

Olicek commented 7 years ago

Zkouším spustit základní test na presenter a tester zamrzne při use Presenter;. Nevím jestli se to někam loguje, nic jsem nenašel. Do command line to nic nevypíše. prostě ten skript nekonečně dlouho běží :) Composer:

"mrtnzlml/testbench": "^v2.4" // i @dev

bootstrap:

require __DIR__ . '/../vendor/autoload.php';
Testbench\Bootstrap::setup(__DIR__ . '/tmp', function (Nette\Configurator $configurator) {

  $configurator->createRobotLoader()->addDirectory([
    __DIR__ . '/../app',
  ])->register();

  $configurator->addParameters([
    'appDir' => __DIR__ . '/../app',
    'testsDir' => __DIR__,
  ]);

  $configurator->addConfig(__DIR__ . '/../app/Config/config.neon');
  $configurator->addConfig(__DIR__ . '/config/default.neon');
});

Presenter:

namespace Tests\Presenters;
require __DIR__ . '/../bootstrap.php';

use Testbench\TPresenter;
use Tester\TestCase;

/**
 * @testCase
 */
class HomepagePresenterTest extends TestCase
{

  use TPresenter;

  public function testRenderDefault()
  {
    $this->checkAction('Homepage:default');
  }

}

(new HomepagePresenterTest())->run();

Dělám něco špatně, nebo to je bug?

mrtnzlml commented 7 years ago

Spusť prosím pouze samotný test pomocí PHP (nějak takto):

php tests/path/to/the/test.phpt

To by mohlo vrátit zajímavější informace...

Olicek commented 7 years ago

mno, nevrátí to nic a úplně stejně to zamrzne. Nechal jsem to cca 3 minuty, ale myslím, že dýl to trvat nemůže :)

mrtnzlml commented 7 years ago

Bez kódu asi nedokážu poradit. Můžeš také vyzkoušet Nette fórum...