Bläddra i källkod

Écrire un premier test unitaire #1300

feature/souke
Guillaume Bourgeois 1 år sedan
förälder
incheckning
b118415226
3 ändrade filer med 3302 tillägg och 1 borttagningar
  1. +3270
    -1
      tests/codeception/common/_support/_generated/UnitTesterActions.php
  2. +7
    -0
      tests/codeception/common/unit.suite.yml
  3. +25
    -0
      tests/codeception/common/unit/ExampleTest.php

+ 3270
- 1
tests/codeception/common/_support/_generated/UnitTesterActions.php
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 7
- 0
tests/codeception/common/unit.suite.yml Visa fil

@@ -4,3 +4,10 @@
# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.

class_name: UnitTester
modules:
enabled:
- Asserts
- Yii2
config:
Yii2:
configFile: '../config/common/unit.php'

+ 25
- 0
tests/codeception/common/unit/ExampleTest.php Visa fil

@@ -0,0 +1,25 @@
<?php

namespace tests\codeception\common\unit;

//use \Tests\Support\UnitTester;

use common\logic\Producer\Producer\Model\Producer;
use common\logic\Producer\Producer\Wrapper\ProducerContainer;
use tests\codeception\common\UnitTester;

class ExampleTest extends \Codeception\Test\Unit
{
protected UnitTester $tester;

protected function _before()
{
}

public function testMe()
{
$producerContainer = ProducerContainer::getInstance();
$producer = $producerContainer->getBuilder()->instanciateProducer();
$this->assertTrue($producer instanceof Producer, 'Producer instancié');
}
}

Laddar…
Avbryt
Spara